Skip to content

Commit

Permalink
Make sure the from/to/len values in fade are numbers
Browse files Browse the repository at this point in the history
Fixes #1027
  • Loading branch information
goldfire committed Sep 7, 2018
1 parent 0716047 commit 8362b75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,11 @@
return self;
}

// Make sure the to/from/len values are numbers.
from = parseFloat(from);
to = parseFloat(to);
len = parseFloat(len);

// Set the volume to the start position.
self.volume(from, id);

Expand Down

0 comments on commit 8362b75

Please sign in to comment.