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

Promise resolver undefined is not a function #96

Open
gitawego opened this issue Sep 29, 2016 · 1 comment · May be fixed by #138
Open

Promise resolver undefined is not a function #96

gitawego opened this issue Sep 29, 2016 · 1 comment · May be fixed by #138

Comments

@gitawego
Copy link

gitawego commented Sep 29, 2016

the module throws error because of misuse of Promise.

Promise can not be instantiated without params.

at line 92 in index.js, instead of

let promise = new Promise();
promise.resolve(result);
return promise;

it should be

return Promise.resolve(result);

or return directly the result

@fiznool
Copy link

fiznool commented Sep 29, 2016

@gitawego there are many issues with the current version on npm. I've just pushed a PR #95 to fix the issues. In the meantime you can use my branch which includes these fixes:

npm install fiznool/mongoose-paginate

Splaktar added a commit to DevIntent/mongoose-paginate that referenced this issue Oct 11, 2016
@lazarofl lazarofl linked a pull request Feb 16, 2018 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants