Skip to content

Commit

Permalink
fix: wrong page state cache will stuck extension
Browse files Browse the repository at this point in the history
  • Loading branch information
vvvvvv1vvvvvv committed Oct 23, 2023
1 parent 1dde4bb commit ba4a7ea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ui/views/SortHat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ const SortHat = () => {
!approval
) {
const cache = (await wallet.getPageStateCache())!;
setTo(cache.path + (cache.search || ''));
return;
if (cache.path) {
console.log(cache);
// prevent path is empty then extension will stuck
setTo(cache.path + (cache.search || ''));
return;
} else {
wallet.clearPageStateCache();
}
}

const currentAccount = await wallet.getCurrentAccount();
Expand Down

0 comments on commit ba4a7ea

Please sign in to comment.