diff --git a/src/webview/frontend/App.tsx b/src/webview/frontend/App.tsx index 6ee7d9b..e6050a3 100644 --- a/src/webview/frontend/App.tsx +++ b/src/webview/frontend/App.tsx @@ -40,10 +40,12 @@ function Judge(props: { const [webviewState, setWebviewState] = useState( () => { const vscodeState = vscodeApi.getState(); - console.log('Restored state:', vscodeState); - return { + let ret = { dialogCloseDate: vscodeState?.dialogCloseDate || Date.now(), }; + vscodeApi.setState(ret); + console.log('Restored to state:', ret); + return ret; }, );