Skip to content

Commit 7d11f20

Browse files
committed
Always fire pause event even if sound is already paused
Fixes goldfire#639
1 parent bf4d369 commit 7d11f20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/howler.core.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -786,11 +786,11 @@
786786
sound._node.pause();
787787
}
788788
}
789+
}
789790

790-
// Fire the pause event, unless `true` is passed as the 2nd argument.
791-
if (!arguments[1]) {
792-
self._emit('pause', sound._id);
793-
}
791+
// Fire the pause event, unless `true` is passed as the 2nd argument.
792+
if (!arguments[1]) {
793+
self._emit('pause', sound ? sound._id : null);
794794
}
795795
}
796796

0 commit comments

Comments
 (0)