From ffa185e10a2efa1b311a95015ff51bf303cb35ed Mon Sep 17 00:00:00 2001
From: Tyler Schicke <tyler_schicke@brown.edu>
Date: Sat, 23 Feb 2019 04:49:37 -0500
Subject: Fixed crash in debug viewer

---
 src/debug/Viewer.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/debug/Viewer.tsx')

diff --git a/src/debug/Viewer.tsx b/src/debug/Viewer.tsx
index ddfe884ed..aff77fca3 100644
--- a/src/debug/Viewer.tsx
+++ b/src/debug/Viewer.tsx
@@ -7,7 +7,7 @@ import { Document } from '../fields/Document';
 import { BasicField } from '../fields/BasicField';
 import { ListField } from '../fields/ListField';
 import { Key } from '../fields/Key';
-import { Field } from '../fields/Field';
+import { Opt, Field } from '../fields/Field';
 import { Server } from '../client/Server';
 
 configure({
@@ -116,7 +116,7 @@ class DebugViewer extends React.Component<{ fieldId: string }> {
     }
 
     update() {
-        Server.GetField(this.props.fieldId, (field => {
+        Server.GetField(this.props.fieldId, action((field: Opt<Field>) => {
             this.field = field;
             if (!field) {
                 this.error = `Field with id ${this.props.fieldId} not found`
-- 
cgit v1.2.3-70-g09d2

