Skip to content

Commit 6876b2f

Browse files
Fix stepper errornously evaluating non-stepper output (#3278)
* Add check to ensure valid stepper output before processing * Fix formatting issue --------- Co-authored-by: Martin Henz <[email protected]>
1 parent 87dbaf3 commit 6876b2f

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)