Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when instantiating a button with a texture key not in the cache #1727

Closed
nesheroj opened this issue Apr 8, 2015 · 3 comments
Closed

Comments

@nesheroj
Copy link

nesheroj commented Apr 8, 2015

Possible regression or unintended breaking change

  • Earliest occurrence: Phaser 2.3.0
  • Prior Behaviour (2.2.2): console warning, but no error whatsoever.
  • Stack trace:
Uncaught TypeError:
Cannot read property 'getFrameByName' of null
  Object.defineProperty.set
  Phaser.Component.LoadTexture.frameName.set
  Phaser.Button.changeStateFrame
  Phaser.Button.setStateFrame
  Phaser.Button.setFrames
  new Phaser.Button

You can check by swapping phaser versions in the provided plunkr.

@nesheroj
Copy link
Author

nesheroj commented Apr 8, 2015

It's probably intended behaviour (My use case was not wanting to load textures while unit testing my components), but I found no documented change about it.

@AbrahamAlcaina
Copy link

I have the same issue.
Any news about it?

photonstorm added a commit that referenced this issue Apr 13, 2015
@photonstorm
Copy link
Collaborator

Looks like the guard added to the frame setter wasn't applied to frameName. Now done, should solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants