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

Count method on index - argument are ignored #53

Open
whodies opened this issue Oct 27, 2013 · 6 comments
Open

Count method on index - argument are ignored #53

whodies opened this issue Oct 27, 2013 · 6 comments

Comments

@whodies
Copy link

whodies commented Oct 27, 2013

Seems that the index count method automatically submit an empty array of argument rather than the arguments I give it - Line 501 :

"count": function() {
return indexOp("count", indexName , []);
},

@whodies
Copy link
Author

whodies commented Oct 27, 2013

Solved it for me by adding the needed arguments at line 501:

"count": function(range) {
return indexOp("count", indexName , range);
},

and line 278:

"count": function(range) {
var range = wrap.range(range);
if (typeof idbIndex.count === "function") {
return wrap.request(idbIndex.count(range));
} else {
throw "Count not implemented for cursors";
}
}

This is a great plugin, thanks for all the hard work !

@axemclion
Copy link
Owner

Can you submit a pull request for this please ?

@whodies
Copy link
Author

whodies commented Oct 27, 2013

Im new here, dont know what a pull request is

@msmuenchen
Copy link

This bug nearly made me throw my machine out of the window (especially: this is not fucking documented ANYWHERE)! Let me write up a PR.

@msmuenchen
Copy link

@axemclion see #57 .

@whodies next time, just fork the repository, clone your forked repository, commit and push your fix. Then create a pull request by going on your forked repo and clicking "create pull request".

@whodies
Copy link
Author

whodies commented Oct 31, 2013

All this stuff is chinese to me. I should read up on what forking and cloning means. Appreciate your help though !

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

3 participants