Skip to content

Commit 0c88ba0

Browse files
committed
If you used a single Game configuration object and didn't specify the enableDebug property it would crash on Debug.preUpdate (thanks @luizbills phaserjs#1053)
1 parent 83619ba commit 0c88ba0

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Version 2.1.0 - "Cairhien" - -in development-
128128
* Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077)
129129
* BitmapFonts are now correctly added to the Cache._bitmapFont array and returned via Cache.getBitmapFont (thanks @prudolfs #1076)
130130
* InputHandler docs updated to avoid Pointer data-type confusion (#1097)
131+
* If you used a single Game configuration object and didn't specify the enableDebug property it would crash on Debug.preUpdate (thanks @luizbills #1053)
131132

132133
### p2.js 0.6.0 Changes and New Features
133134

src/core/Game.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,11 @@ Phaser.Game.prototype = {
346346

347347
this.config = config;
348348

349+
if (typeof config['enableDebug'] === 'undefined')
350+
{
351+
this.config.enableDebug = true;
352+
}
353+
349354
if (config['width'])
350355
{
351356
this.width = Phaser.Utils.parseDimension(config['width'], 0);

0 commit comments

Comments
 (0)