diff --git a/src/webview/frontend/App.tsx b/src/webview/frontend/App.tsx index 6af6fa3..cd9c0cf 100644 --- a/src/webview/frontend/App.tsx +++ b/src/webview/frontend/App.tsx @@ -39,7 +39,7 @@ function Judge(props: { const [onlineJudgeEnv, setOnlineJudgeEnv] = useState(false); const [webviewState, setWebviewState] = useState( () => { - const vscodeState = vscodeApi.getState(); + const vscodeState = vscodeApi?.getState(); const ret = { dialogCloseDate: vscodeState?.dialogCloseDate || Date.now(), };