mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 11:04:00 +00:00
Fix spelling of IndexedDB
This commit is contained in:
parent
a8267581d0
commit
b34d90e998
2 changed files with 6 additions and 6 deletions
|
|
@ -38,7 +38,7 @@ import {
|
|||
disableMarquee
|
||||
} from "./config";
|
||||
|
||||
import { bindToIndexDB } from "./indexdb";
|
||||
import { bindToIndexedDB } from "./indexedDB";
|
||||
|
||||
const requireJSZip = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
@ -303,7 +303,7 @@ Raven.context(async () => {
|
|||
// Expose webamp instance for debugging and integration tests.
|
||||
window.__webamp = webamp;
|
||||
|
||||
await bindToIndexDB(webamp, clearState, useState);
|
||||
await bindToIndexedDB(webamp, clearState, useState);
|
||||
|
||||
await webamp.renderWhenReady(document.getElementById("app"));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ import IdbKvStore from "idb-kv-store";
|
|||
import { throttle } from "./utils";
|
||||
const LOCAL_STORAGE_KEY = "webamp_state";
|
||||
|
||||
export async function bindToIndexDB(webamp, clearState, useState) {
|
||||
export async function bindToIndexedDB(webamp, clearState, useState) {
|
||||
const localStore = new IdbKvStore("webamp_state_database");
|
||||
|
||||
if (clearState) {
|
||||
try {
|
||||
await localStore.clear();
|
||||
} catch (e) {
|
||||
console.log("Failed to clear our IndexdB state", e);
|
||||
console.log("Failed to clear our IndexeddB state", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ export async function bindToIndexDB(webamp, clearState, useState) {
|
|||
try {
|
||||
previousSerializedState = await localStore.get(LOCAL_STORAGE_KEY);
|
||||
} catch (e) {
|
||||
console.error("Failed to load the saves state from IndexDB", e);
|
||||
console.error("Failed to load the saves state from IndexedDB", e);
|
||||
}
|
||||
|
||||
if (previousSerializedState != null) {
|
||||
|
|
@ -33,7 +33,7 @@ export async function bindToIndexDB(webamp, clearState, useState) {
|
|||
try {
|
||||
await localStore.set(LOCAL_STORAGE_KEY, serializedState);
|
||||
} catch (e) {
|
||||
console.log("Failed to save our state to IndexDB", e);
|
||||
console.log("Failed to save our state to IndexedDB", e);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue