Skip to content

Commit

Permalink
Resolve retrieved hook with the result. - Fix #315
Browse files Browse the repository at this point in the history
  • Loading branch information
neumino committed Aug 14, 2015
1 parent d9d96ac commit 495333a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,12 @@ Model.prototype._parse = function(data, ungroup) {
promise.then(function() {
var promise = data[i].validate();
if (promise instanceof Promise) {
promise.then(resolve).error(reject);
promise.then(function() {
resolve(data[i])
}).error(reject);
}
else {
resolve();
resolve(data[i]);
}
}).error(reject);
promises.push(promise);
Expand Down

0 comments on commit 495333a

Please sign in to comment.