From de9653ab45814d8908acd078a06a5ec289d6a7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 9 Feb 2016 10:07:28 +0100 Subject: [PATCH] Fix new exception in unit tests. --- src/view/CanvasView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/CanvasView.js b/src/view/CanvasView.js index ad98603f..5a5b104b 100644 --- a/src/view/CanvasView.js +++ b/src/view/CanvasView.js @@ -136,7 +136,8 @@ var CanvasView = View.extend(/** @lends CanvasView# */{ ctx = this._context, size = this._viewSize; ctx.clearRect(0, 0, size.width + 1, size.height + 1); - project.draw(ctx, this._matrix, this._pixelRatio); + if (project) + project.draw(ctx, this._matrix, this._pixelRatio); this._needsUpdate = false; return true; }