mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 07:06:00 +00:00
prettier
This commit is contained in:
@@ -7,13 +7,13 @@ export default async function localStorageGarbageCollector() {
|
||||
|
||||
const closeLimit = moment().add(-7, 'day').valueOf();
|
||||
|
||||
openedTabs = openedTabs.filter((x) => !x.closedTime || x.closedTime > closeLimit);
|
||||
openedTabs = openedTabs.filter(x => !x.closedTime || x.closedTime > closeLimit);
|
||||
localStorage.setItem('openedTabs', JSON.stringify(openedTabs));
|
||||
|
||||
const toRemove = [];
|
||||
for (const key in localStorage) {
|
||||
if (!key.startsWith('tabdata_')) continue;
|
||||
if (openedTabs.find((x) => key.endsWith('_' + x.tabid))) continue;
|
||||
if (openedTabs.find(x => key.endsWith('_' + x.tabid))) continue;
|
||||
toRemove.push(key);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export default async function localStorageGarbageCollector() {
|
||||
const toRemoveForage = [];
|
||||
for (const key in keysForage) {
|
||||
if (!key.startsWith('tabdata_')) continue;
|
||||
if (openedTabs.find((x) => key.endsWith('_' + x.tabid))) continue;
|
||||
if (openedTabs.find(x => key.endsWith('_' + x.tabid))) continue;
|
||||
toRemoveForage.push(key);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user