Skip to content

Commit

Permalink
Fix spelling of IndexedDB
Browse files Browse the repository at this point in the history
  • Loading branch information
captbaritone committed Oct 1, 2018
1 parent a826758 commit b34d90e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
disableMarquee
} from "./config";

import { bindToIndexDB } from "./indexdb";
import { bindToIndexedDB } from "./indexedDB";

const requireJSZip = () => {
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -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"));
});
8 changes: 4 additions & 4 deletions js/indexdb.js → js/indexedDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

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

Expand Down

0 comments on commit b34d90e

Please sign in to comment.