safety check on bounds

This commit is contained in:
Stewart Allen 2017-11-01 16:25:06 -04:00
commit 2c3d31e431

View file

@ -361,7 +361,7 @@ var gs_kiri_print = exports;
} }
function checkBisect(p1, p2, bounds) { function checkBisect(p1, p2, bounds) {
if (p1.distTo2D(p2) < minSeek) return; if (!bounds || p1.distTo2D(p2) < minSeek) return;
var more = true; var more = true;
bounds.forEach(function(bp) { bounds.forEach(function(bp) {
if (!more) return; if (!more) return;