mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Throw more errors
This commit is contained in:
parent
43d3243179
commit
cca42872ed
1 changed files with 3 additions and 0 deletions
|
@ -506,6 +506,9 @@
|
||||||
while( firstNode.uniqueID !== nextNode.uniqueID ){
|
while( firstNode.uniqueID !== nextNode.uniqueID ){
|
||||||
path.add( nextNode.getSegment( true ) );
|
path.add( nextNode.getSegment( true ) );
|
||||||
nextNode.visited = true;
|
nextNode.visited = true;
|
||||||
|
if( !nextNode.linkOut ){
|
||||||
|
throw { name: 'Boolean Error', message: 'No link found at node id: ' + nextNode.id };
|
||||||
|
}
|
||||||
nextNode = nextNode.linkOut.nodeOut;
|
nextNode = nextNode.linkOut.nodeOut;
|
||||||
}
|
}
|
||||||
path.closed = true;
|
path.closed = true;
|
||||||
|
|
Loading…
Reference in a new issue