Skip to content

Commit 413385e

Browse files
committed
Add check to ensure valid stepper output before processing
1 parent 85cf944 commit 413385e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pages/playground/PlaygroundTabs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export const makeSubstVisualizerTabFrom = (
4848
editorOutput &&
4949
editorOutput.type === 'result' &&
5050
editorOutput.value instanceof Array &&
51-
editorOutput.value[0] === Object(editorOutput.value[0])
51+
editorOutput.value[0] === Object(editorOutput.value[0]) &&
52+
// check if output is from stepper
53+
"ast" in editorOutput.value[0]
5254
) {
5355
return editorOutput.value;
5456
} else {

0 commit comments

Comments
 (0)