mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Fix thrown Error messages.
This commit is contained in:
parent
9926d3f1c4
commit
1615b50b68
1 changed files with 2 additions and 2 deletions
|
@ -1442,7 +1442,7 @@ var Path = this.Path = PathItem.extend({
|
|||
function getCurrentSegment(that) {
|
||||
var segments = that._segments;
|
||||
if (segments.length == 0)
|
||||
throw('Use a moveTo() command first');
|
||||
throw new Error('Use a moveTo() command first');
|
||||
return segments[segments.length - 1];
|
||||
}
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ var Path = this.Path = PathItem.extend({
|
|||
.subtract(to.multiply(t * t)).divide(2 * t * t1);
|
||||
if (handle.isNaN())
|
||||
throw new Error(
|
||||
"Cannot put a curve through points with parameter=" + t);
|
||||
'Cannot put a curve through points with parameter = ' + t);
|
||||
this.quadraticCurveTo(handle, to);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue