mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -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) {
|
function getCurrentSegment(that) {
|
||||||
var segments = that._segments;
|
var segments = that._segments;
|
||||||
if (segments.length == 0)
|
if (segments.length == 0)
|
||||||
throw('Use a moveTo() command first');
|
throw new Error('Use a moveTo() command first');
|
||||||
return segments[segments.length - 1];
|
return segments[segments.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1506,7 +1506,7 @@ var Path = this.Path = PathItem.extend({
|
||||||
.subtract(to.multiply(t * t)).divide(2 * t * t1);
|
.subtract(to.multiply(t * t)).divide(2 * t * t1);
|
||||||
if (handle.isNaN())
|
if (handle.isNaN())
|
||||||
throw new Error(
|
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);
|
this.quadraticCurveTo(handle, to);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue