Skip to content

Commit e7177c5

Browse files
handling the case when only config object is passed to the play method
1 parent 5796cd4 commit e7177c5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

v3/src/sound/BaseSound.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ var BaseSound = new Class({
114114
},
115115
play: function (marker, config) {
116116
if (marker === void 0) { marker = ''; }
117+
if (typeof marker === 'object') {
118+
config = marker;
119+
marker = '';
120+
}
117121
if (typeof marker !== 'string') {
118122
console.error('Sound marker name has to be a string!');
119123
return null;

0 commit comments

Comments
 (0)