Skip to content

Commit

Permalink
put clean missingtabs at the beginning of use effect
Browse files Browse the repository at this point in the history
  • Loading branch information
boyazeng committed Apr 30, 2024
1 parent d101a6f commit 7d277e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function App() {

useEffect(() => {
chrome.storage.local.get(['tabs', 'selectedThresholds'], (result) => {
cleanupMissingTabs();
if (result.tabs) {
const now = Date.now();
const sortedTabs: { [key: string]: Tab[] } = {};
Expand All @@ -46,8 +47,6 @@ function App() {
if (result.selectedThresholds) {
setSelectedThresholds(result.selectedThresholds);
}

cleanupMissingTabs();
});
}, []);

Expand Down

0 comments on commit 7d277e2

Please sign in to comment.