I'm using classes in node.js but in this example, this.done is undefined. Any ideas on how to easily fix that? I'd like to avoid going back to callback hell or learning to use promises right now.
MyClass.prototype.method1 = function(done) {
this.method1Done = done;
mysql.query([...], this._method1QueryCallback);
}
MyClass.prototype._method1QueryCallback = function(err, rows) {
[...]
this.done(err, rows)
}