Skip to content

Commit

Permalink
Update actions.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
huhuanming committed Dec 23, 2024
1 parent 0f5c10a commit 55f5ee2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/kit/src/states/jotai/contexts/discovery/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function buildWebTabData(tabs: IWebTab[]) {
map[tab.id] = tab;
});
return {
data: tabs,
data: [...tabs],
keys,
map,
};
Expand Down Expand Up @@ -124,9 +124,9 @@ class ContextJotaiActionsDiscovery extends ContextJotaiActionsBase {
}
const result = buildWebTabData(newTabs);
// Should update tabs
if (!isEqual(result.keys, webTabs.keys) || options?.forceUpdate) {
set(webTabsAtom(), { keys: result.keys, tabs: result.data });
}
// if (!isEqual(result.keys, webTabs.keys) || options?.forceUpdate) {
set(webTabsAtom(), { keys: result.keys, tabs: result.data });
// }

set(webTabsMapAtom(), () => result.map);
loggerForEmptyData(result.data, 'buildWebTabs->saveToSimpleDB');
Expand Down

0 comments on commit 55f5ee2

Please sign in to comment.