From 852054b7725df3ddbb8944450eaff5194dfb0369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darek=20Zieli=C5=84ski?= Date: Mon, 14 Jul 2014 20:09:22 +0200 Subject: [PATCH] Plus validation of non-point objects --- src/core/Camera.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Camera.js b/src/core/Camera.js index e4169f102..08d5ce68a 100644 --- a/src/core/Camera.js +++ b/src/core/Camera.js @@ -419,8 +419,8 @@ Object.defineProperty(Phaser.Camera.prototype, "position", { set: function (value) { - this.view.x = value.x; - this.view.y = value.y; + if (typeof value.x !== "undefined") { this.view.x = value.x; } + if (typeof value.y !== "undefined") { this.view.y = value.y; } if (this.bounds) {