mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Rogue null
check borked the creation of emitters when a null frame was specified.
This commit is contained in:
parent
153d1a113a
commit
d74018f3d0
1 changed files with 3 additions and 2 deletions
|
@ -33,7 +33,8 @@ var ParticleEmitterManager = new Class({
|
|||
this.frame = null;
|
||||
this.frameNames = [];
|
||||
|
||||
if (typeof frame === 'object' || Array.isArray(frame))
|
||||
// frame is optional and can contain the emitters array or object if skipped
|
||||
if (frame !== null && (typeof frame === 'object' || Array.isArray(frame)))
|
||||
{
|
||||
emitters = frame;
|
||||
frame = null;
|
||||
|
@ -45,7 +46,7 @@ var ParticleEmitterManager = new Class({
|
|||
|
||||
this.wells = new List(this);
|
||||
|
||||
if (emitters !== undefined)
|
||||
if (emitters)
|
||||
{
|
||||
// An array of emitter configs?
|
||||
if (!Array.isArray(emitters))
|
||||
|
|
Loading…
Reference in a new issue