mirror of https://github.com/vladmandic/automatic
Remove extra type checking...
- JSDoc should automatically apply the types to the variables/parameters in the IDE to provide a warning when the wrong value is being sent.pull/4624/head
parent
f4bb78b51c
commit
137504de36
|
|
@ -178,13 +178,6 @@ async function idbCount(folder) {
|
||||||
*/
|
*/
|
||||||
async function idbFolderCleanup(keepSet, folder, signal) {
|
async function idbFolderCleanup(keepSet, folder, signal) {
|
||||||
if (!db) return null;
|
if (!db) return null;
|
||||||
if (!(keepSet instanceof Set)) {
|
|
||||||
throw new TypeError('IndexedDB cleaning function must be given a Set() of the current gallery hashes');
|
|
||||||
}
|
|
||||||
if (typeof folder !== 'string') {
|
|
||||||
throw new Error('IndexedDB cleaning function must be told the current active folder');
|
|
||||||
}
|
|
||||||
|
|
||||||
let removals = new Set(await idbGetAllKeys('folder', folder));
|
let removals = new Set(await idbGetAllKeys('folder', folder));
|
||||||
removals = removals.difference(keepSet); // Don't need to keep full set in memory
|
removals = removals.difference(keepSet); // Don't need to keep full set in memory
|
||||||
const totalRemovals = removals.size;
|
const totalRemovals = removals.size;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue