Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key #9

Closed
KrishnaPG opened this issue Jul 12, 2020 · 1 comment
Assignees
Labels

Comments

@KrishnaPG
Copy link

Describe the bug
IndexeddbPersistence.set() method has problems.

Checkout this line of code

return idb.put(custom, key, value)

and then check this definition of put method from lib0:

export const put = (store, item, key) =>
  rtop(store.put(item, key))

https://github.com/dmonad/lib0/blob/8a89d8d369c9dccd1187a75c04232e2a1ce39b7b/indexeddb.js#L126

The lib0 is expecting item followed by key as parameters, while the set call in this package is sending key first and then value next, which is leading to the error:

image

Failed to execute 'put' on 'IDBObjectStore': The parameter is not a valid key
@dmonad
Copy link
Member

dmonad commented Jul 27, 2020

Thanks for noticing. Fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants