From e5635325d560b598faca46033b2b6a982663d11a Mon Sep 17 00:00:00 2001 From: Katelyn Mann Date: Tue, 4 Oct 2016 13:17:09 -0700 Subject: [PATCH] Fix #648. It was calling method on the wrong object. Broken by refactoring in #606. --- demos/blocklyfactory/workspacefactory/wfactory_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/blocklyfactory/workspacefactory/wfactory_controller.js b/demos/blocklyfactory/workspacefactory/wfactory_controller.js index faf3c09f6..63634a65e 100644 --- a/demos/blocklyfactory/workspacefactory/wfactory_controller.js +++ b/demos/blocklyfactory/workspacefactory/wfactory_controller.js @@ -735,7 +735,7 @@ WorkspaceFactoryController.prototype.importFile = function(file, importMode) { // Confirm that the user wants to override their current toolbox. var hasToolboxElements = controller.model.hasElements() || - controller.getAllBlocks().length > 0; + controller.toolboxWorkspace.getAllBlocks().length > 0; if (hasToolboxElements && !confirm('Are you sure you want to import? You will lose your ' + 'current toolbox. ')) {