You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Denodeification does not work correctly for me and when calling get() on a store I get an exception: TypeError: undefined is not a function at IDBRequest.onsuccess .... This is not the only method that fails when trying to use it as a promise.
Sample code:
I could track down the problem in the promise-plugin:
// Method name and argument countvarstoreMethods=[['put',3],['get',2],['del',2],['count',1],['clear',1],['batch',2],['all',1],];// Later in the patch method// Denodeification with argument count specified in the storeMethods arrayobject[m[0]]=denodeify(object[m[0]],m[1]);// ...
Denodeification does not work correctly for me and when calling
get()
on a store I get an exception:TypeError: undefined is not a function at IDBRequest.onsuccess ...
. This is not the only method that fails when trying to use it as a promise.Sample code:
I could track down the problem in the promise-plugin:
The argument count in the array is wrong. For
get
it works if I use an argument count of1
. But why do you bother maintaining a list with argument counts? You could just omit the count and thedenodeify()
method would figure it out itself (https://github.com/then/promise/blob/0a8c481dd8e9825ffd05251658f22d64bead1315/src/node-extensions.js#L13).This solves the problem:
Was there a reason for manually specifying the count? Do you think I maybe ran into this problem because of something
webpack
does?The text was updated successfully, but these errors were encountered: