Added validation for marker name

This commit is contained in:
Pavle Goloskokovic 2017-11-23 12:34:43 +01:00
parent 2bcffe6f2f
commit de5689b129

View file

@ -142,6 +142,9 @@ var BaseSound = new Class({
console.error('Marker object has to be provided to \'addMarker\' method!');
return false;
}
if (!marker.name || typeof marker.name !== 'string') {
console.error('Marker has to have a valid name!');
}
marker = Extend(true, {
name: '',
start: 0,