Skip to content

Commit c7bcb9f

Browse files
committed
Fix bug in unload method that prevented the first sound from being unloaded
1 parent 8fff876 commit c7bcb9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

howler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@
10671067

10681068
// remove the reference in the global Howler object
10691069
var index = Howler._howls.indexOf(self);
1070-
if (index) {
1070+
if (index !== null && index >= 0) {
10711071
Howler._howls.splice(index, 1);
10721072
}
10731073

0 commit comments

Comments
 (0)