Skip to content

Commit 8362b75

Browse files
committed
Make sure the from/to/len values in fade are numbers
Fixes goldfire#1027
1 parent 0716047 commit 8362b75

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/howler.core.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,11 @@
11511151
return self;
11521152
}
11531153

1154+
// Make sure the to/from/len values are numbers.
1155+
from = parseFloat(from);
1156+
to = parseFloat(to);
1157+
len = parseFloat(len);
1158+
11541159
// Set the volume to the start position.
11551160
self.volume(from, id);
11561161

0 commit comments

Comments
 (0)