Skip to content

Commit

Permalink
Merge pull request #1423 from rigobauer/fix/seek-not-checking-sound-i…
Browse files Browse the repository at this point in the history
…s-loaded

fix: check that sounds are loaded in seek (returning current position)
  • Loading branch information
goldfire authored May 16, 2021
2 parents d165bfd + 42d1506 commit e9b6241
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,9 @@
// Determine the values based on arguments.
if (args.length === 0) {
// We will simply return the current position of the first node.
id = self._sounds[0]._id;
if (self._sounds.length) {
id = self._sounds[0]._id;
}
} else if (args.length === 1) {
// First check if this is an ID, and if not, assume it is a new seek position.
var ids = self._getSoundIds();
Expand Down

0 comments on commit e9b6241

Please sign in to comment.