diff --git a/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx b/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx index 48e8fa04f0..8cbb9ef0de 100644 --- a/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/recorderCardUI.tsx @@ -17,7 +17,7 @@ export function RecorderUI (props: RecorderProps) { } useEffect(() => { - if (props.currentFile.endsWith('.json')) setEnableRunButton(false) + if (props.currentFile && props.currentFile.endsWith('.json')) setEnableRunButton(false) else setEnableRunButton(true) }, [props.currentFile])