From b34d90e998a201ac98438e9b076ed3e1e223e324 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 30 Sep 2018 19:55:01 -0700 Subject: [PATCH] Fix spelling of IndexedDB --- js/index.js | 4 ++-- js/{indexdb.js => indexedDB.js} | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename js/{indexdb.js => indexedDB.js} (75%) diff --git a/js/index.js b/js/index.js index 90476cb6..299e7b03 100644 --- a/js/index.js +++ b/js/index.js @@ -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")); }); diff --git a/js/indexdb.js b/js/indexedDB.js similarity index 75% rename from js/indexdb.js rename to js/indexedDB.js index b73a027b..3a157d1c 100644 --- a/js/indexdb.js +++ b/js/indexedDB.js @@ -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); } }