Why does my Dexie.js query not recognize a localstorage value

I am trying get a value from indexeddb with Dexie.js but it does not recognize value from localStorage.

I tried async/await, promises, placing localstorage call on created, mounted, outside export default, and none of these ways worked.

fetchData() {
  return dbDexie.tactics1
    .where('i')
    .equals(localStorage.getItem("id")) // Here is the problem
    .toArray()
    .then((r) => r[0].f);
}

5 thoughts on “Why does my Dexie.js query not recognize a localstorage value”

  1. 12776 146809Greatest fighter toasts ought to entertain and supply prize on your couples. Initially audio system next to obnoxious crowd would be wise to understand one specific gold colored strategy as to public speaking, which is individual interests self. very best man jokes 601000

    Reply

Leave a Comment