Fix spelling of IndexedDB

This commit is contained in:
Jordan Eldredge 2018-09-30 19:55:01 -07:00
parent a8267581d0
commit b34d90e998
2 changed files with 6 additions and 6 deletions

View file

@ -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"));
});

View file

@ -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);
}
}