From 6c84d25fa04e087c534d0c6becb340c5d6be0871 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Wed, 5 Dec 2018 23:59:27 -0500 Subject: [PATCH] Fix error logging when workspace fails to update because of error from scratch-blocks. --- src/containers/blocks.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index e038790e4..bc7ef7d8e 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -325,7 +325,9 @@ class Blocks extends React.Component { // incomplete. Throwing the error would keep things like setting the // correct editing target from happening which can interfere with // some blocks and processes in the vm. - error.message = `Workspace Update Error: ${error.message}`; + if (error.message) { + error.message = `Workspace Update Error: ${error.message}`; + } log.error(error); } this.workspace.addChangeListener(this.props.vm.blockListener);