mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Added validation for invalid marker name to updateMarker method
This commit is contained in:
parent
42735ee09f
commit
0e97a18553
1 changed files with 4 additions and 0 deletions
|
@ -172,6 +172,10 @@ var BaseSound = new Class({
|
|||
console.error('updateMarker - Marker object has to be provided!');
|
||||
return false;
|
||||
}
|
||||
if (!marker.name || typeof marker.name !== 'string') {
|
||||
console.error('updateMarker - Marker has to have a valid name!');
|
||||
return false;
|
||||
}
|
||||
this.markers[marker.name] = Extend(true, this.markers[marker.name], marker);
|
||||
return true;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue