-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core/biblio-db): Move from indexedDB to idb (#2228)
* Starting to refactor * fix requirejs error * Fixed issue with tests, refactoring completed * lint fix * fix idb import on xref * Apply suggested corrections * async and lint fixes * Removed redundant promises * Applied suggested changes * lint fix * karma test workaround * use new importIdb() * return await
- Loading branch information
Showing
3 changed files
with
56 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Temporary workaround until browsers get import-maps | ||
*/ | ||
export async function importIdb() { | ||
try { | ||
return await import("idb"); | ||
} catch { | ||
return await import("../../node_modules/idb/build/esm/index.js"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters