mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
Added validation for marker name
This commit is contained in:
parent
2bcffe6f2f
commit
de5689b129
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue