mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Don't construc the indexeddb by default
This seems to be causing errors for some people. I think I should probably write the IndexedDB integration myself.
This commit is contained in:
parent
d517f10bec
commit
1814aaa466
1 changed files with 3 additions and 4 deletions
|
|
@ -3,6 +3,9 @@ import { throttle } from "./utils";
|
|||
const LOCAL_STORAGE_KEY = "webamp_state";
|
||||
|
||||
export async function bindToIndexedDB(webamp, clearState, useState) {
|
||||
if (!useState) {
|
||||
return;
|
||||
}
|
||||
const localStore = new IdbKvStore("webamp_state_database");
|
||||
|
||||
if (clearState) {
|
||||
|
|
@ -13,10 +16,6 @@ export async function bindToIndexedDB(webamp, clearState, useState) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!useState) {
|
||||
return;
|
||||
}
|
||||
|
||||
let previousSerializedState = null;
|
||||
try {
|
||||
previousSerializedState = await localStore.get(LOCAL_STORAGE_KEY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue