mirror of
https://github.com/wassname/phaser.git
synced 2026-07-27 11:25:30 +08:00
Updating and fixing tests
This commit is contained in:
@@ -268,7 +268,7 @@ module Phaser.Components {
|
||||
|
||||
public set frameName(value: string) {
|
||||
|
||||
if (this._frameData.getFrameByName(value))
|
||||
if (this._frameData && this._frameData.getFrameByName(value))
|
||||
{
|
||||
this.currentFrame = this._frameData.getFrameByName(value);
|
||||
|
||||
@@ -277,6 +277,10 @@ module Phaser.Components {
|
||||
|
||||
this._frameIndex = this.currentFrame.index;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Error("Cannot set frameName: " + value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user