From a6b32651899b2a7bd2c0a3e7a1d55ae5f2f67da4 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Thu, 6 Sep 2018 14:32:26 -0400 Subject: [PATCH] Don't chapter.reset() on change while drawing (closes #5295) The cause of this crash was: - when cancelling a line, `drawWay.cancel()` needs to clean up old edits. - it does this by looping `context.pop()` them off history until they are gone - each `context.pop()` dispatches a 'change' event - if we reset the chapter on one of these change events, it throws away the graph, and `drawWay.cancel()` can't finish what it's doing --- modules/ui/intro/line.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/ui/intro/line.js b/modules/ui/intro/line.js index 4a156ae27..be40f73cf 100644 --- a/modules/ui/intro/line.js +++ b/modules/ui/intro/line.js @@ -161,11 +161,6 @@ export function uiIntroLine(context, reveal) { }, 550); // after easing.. context.history().on('change.intro', function() { - var entity = _tulipRoadID && context.hasEntity(_tulipRoadID); - if (!entity) { - return chapter.restart(); - } - if (isLineConnected()) { continueTo(continueLine); }