We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 330b7d0 commit 695ec61Copy full SHA for 695ec61
src/view/CanvasView.js
@@ -43,6 +43,10 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
43
canvas = CanvasProvider.getCanvas(size);
44
}
45
var ctx = this._context = canvas.getContext('2d');
46
+ if (!ctx) {
47
+ throw new Error('Canvas ' + canvas +
48
+ ' is unable to provide a 2D context.');
49
+ }
50
// Save context right away, and restore in #remove(). Also restore() and
51
// save() again in _setElementSize() to prevent accumulation of scaling.
52
ctx.save();
0 commit comments