mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Improve exception when passing an invalid canvas.
This commit is contained in:
parent
67d969ba56
commit
73fe0899ae
1 changed files with 2 additions and 2 deletions
|
@ -38,8 +38,8 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
|||
var size = Size.read(arguments);
|
||||
if (size.isZero())
|
||||
throw new Error(
|
||||
'Cannot create CanvasView with the provided arguments: '
|
||||
+ arguments);
|
||||
'Cannot create CanvasView with the provided argument: '
|
||||
+ canvas);
|
||||
canvas = CanvasProvider.getCanvas(size);
|
||||
}
|
||||
var ctx = this._context = canvas.getContext('2d');
|
||||
|
|
Loading…
Reference in a new issue