From d165aad7c31395db6cff8d5029e4638534f609e3 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Thu, 9 Apr 2020 02:43:50 -0400
Subject: from last

---
 src/client/views/nodes/ScriptingBox.tsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/client/views/nodes/ScriptingBox.tsx')

diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index 93956592f..f930c6692 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -46,9 +46,8 @@ export class ScriptingBox extends DocAnnotatableComponent<FieldViewProps, Script
             transformer: DocumentIconContainer.getTransformer(),
             params
         });
-        this.dataDoc[this.props.fieldKey] = result.compiled ? new ScriptField(result) : undefined;
         this._errorMessage = isCompileError(result) ? result.errors.map(e => e.messageText).join("\n") : "";
-        return ScriptCast(this.dataDoc[this.props.fieldKey]);
+        return this.dataDoc[this.props.fieldKey] = result.compiled ? new ScriptField(result) : undefined;
     }
 
     @action
-- 
cgit v1.2.3-70-g09d2

