Skip to content

Commit

Permalink
Fix initial state bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrawal-d committed Jun 16, 2024
1 parent 0b7e447 commit ca322db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/webview/frontend/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ function Judge(props: {
const [webviewState, setWebviewState] = useState<WebViewpersistenceState>(
() => {
const vscodeState = vscodeApi.getState();
console.log('Restored state:', vscodeState);
return {
let ret = {

Check failure on line 43 in src/webview/frontend/App.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

'ret' is never reassigned. Use 'const' instead
dialogCloseDate: vscodeState?.dialogCloseDate || Date.now(),
};
vscodeApi.setState(ret);
console.log('Restored to state:', ret);
return ret;
},
);

Expand Down

0 comments on commit ca322db

Please sign in to comment.