Created
May 22, 2011 15:03
-
-
Save xsyn/985550 to your computer and use it in GitHub Desktop.
Cradle callback issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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