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

[pre-script] put method not working #75

Closed
raveesh-me opened this issue Dec 11, 2018 · 1 comment
Closed

[pre-script] put method not working #75

raveesh-me opened this issue Dec 11, 2018 · 1 comment

Comments

@raveesh-me
Copy link

I am using idb-promised by including this script before dbhelper.js

Put method is not working,
dbpromise

Uncaught (in promise) DOMException: Failed to execute 'put' on 'IDBObjectStore': The object store uses out-of-line keys and has no key generator and the key parameter was not provided.

This is where the DevTools say that the code is failing:

idb/lib/idb.js

Line 23 in b17dfbd

request = obj[method].apply(obj, args);

I think the issue is with this function in particular:

idb/lib/idb.js

Line 52 in b17dfbd

function proxyRequestMethods(ProxyClass, targetProp, Constructor, properties) {

Please look into this

@raveesh-me
Copy link
Author

My Bad.

dbPromise.then(db => {
        const tx = db.transaction('restaurants', 'readwrite');
        tx.objectStore('restaurants').put(restaurants, 'restaurants');
        return tx.complete;
      });

Solved this

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

No branches or pull requests

1 participant