Skip to content

Instantly share code, notes, and snippets.

@xsyn

xsyn/gist:985550

Created May 22, 2011
Embed
What would you like to do?
Cradle callback issue
DreamModel.prototype.findAll = function(callback) {
this.db.view('dream/all', function(err, res) {
if (err) {
console.log(err)
} else {
var docs = [];
res.forEach(function (row) {
docs.push(row);
});
callback(null, docs);
}
});
};
Returns this error:
/Users/xsyn/Development/didit.co.za/models/dreamModel.js:22
callback(null, docs);
^
TypeError: string is not a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.