Skip to content

Commit

Permalink
Revert "Do not pass redundant callback to play function if not requir…
Browse files Browse the repository at this point in the history
…ed (#729)" (#775)

This reverts commit ed05fb9.
  • Loading branch information
zmxv committed Jan 6, 2022
1 parent ad98809 commit c5cb1e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Sound.prototype.isLoaded = function() {

Sound.prototype.play = function(onEnd) {
if (this._loaded) {
RNSound.play(this._key, onEnd ? (successfully) => onEnd(successfully) : null);
RNSound.play(this._key, (successfully) => onEnd && onEnd(successfully));
} else {
onEnd && onEnd(false);
}
Expand Down

0 comments on commit c5cb1e1

Please sign in to comment.