We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm getting undefined ouput when calling for the returned value comming from the yield call. It worked with co library.
"use strict"; var monk = require("monk"); var wrap = require("co-monk"); var db = monk("localhost/test"); var users = wrap(db.get("users")); class User { constructor(user) { if (typeof user == "object") { var findUser = this.findOne(user.id); findUser.next(); findUser.next(); if(findUser != null){ this._user = user; } } else { console.error("user parameter is not an oject"); return false; } } *findOne(id) { var userData = yield users.findOne({_id: id}); console.log(userData); // Getting undefined this._user = userData; }; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm getting undefined ouput when calling for the returned value comming from the yield call.
It worked with co library.
here's my code :
The text was updated successfully, but these errors were encountered: