fix jshint errors
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
This commit is contained in:
parent
7a3e254403
commit
9c147f1b25
|
@ -677,7 +677,7 @@ Model.nestRemoting = function(relationName, options, cb) {
|
|||
try {
|
||||
nestedFn.apply(inst, args);
|
||||
} catch (err) {
|
||||
cb && cb(err);
|
||||
if (cb) return cb(err);
|
||||
}
|
||||
} else if (cb) {
|
||||
cb(err, null);
|
||||
|
@ -695,7 +695,7 @@ Model.nestRemoting = function(relationName, options, cb) {
|
|||
try {
|
||||
nestedFn.apply(inst, args);
|
||||
} catch (err) {
|
||||
cb && cb(err);
|
||||
if (cb) return cb(err);
|
||||
}
|
||||
} else if (cb) {
|
||||
cb(err, null);
|
||||
|
|
|
@ -1169,7 +1169,7 @@ describe('relations - integration', function() {
|
|||
Image.belongsTo(Book);
|
||||
|
||||
// fake a remote method that match the filter in Model.nestRemoting()
|
||||
Page.prototype.__throw__errors = function () {
|
||||
Page.prototype['__throw__errors'] = function() {
|
||||
throw new Error('This should not crash the app');
|
||||
};
|
||||
|
||||
|
@ -1313,7 +1313,7 @@ describe('relations - integration', function() {
|
|||
});
|
||||
});
|
||||
|
||||
it('should catch error if nested function throws', function (done) {
|
||||
it('should catch error if nested function throws', function(done) {
|
||||
var test = this;
|
||||
this.get('/api/books/' + test.book.id + '/pages/' + this.page.id + '/throws')
|
||||
.end(function(err, res) {
|
||||
|
|
Loading…
Reference in New Issue