Skip to content

Commit d86d01b

Browse files
committed
Camera.setBoundsToWorld only adjusts the bounds if it exists (thanks @prudolfs phaserjs#2099)
1 parent 4143b3f commit d86d01b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
296296
* Added useCapture flags to removeEventListener in MSPointer class (thanks @pmcmonagle #2055)
297297
* Under setTimeOut (or when `forceSetTimeOut` was true) the Time was incorrectly setting `Time.timeExpected` causing game updates to lag (thanks @satan6 #2087)
298298
* Fixes edge case when TilingSprite is removed before render (thanks @pnstickne #2097 #2092)
299+
* Camera.setBoundsToWorld only adjusts the bounds if it exists (thanks @prudolfs #2099)
299300

300301
### Pixi Updates
301302

src/core/Camera.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ Phaser.Camera.prototype = {
315315
*/
316316
setBoundsToWorld: function () {
317317

318-
this.bounds.copyFrom(this.game.world.bounds);
318+
if (this.bounds)
319+
{
320+
this.bounds.copyFrom(this.game.world.bounds);
321+
}
319322

320323
},
321324

0 commit comments

Comments
 (0)