fix jshint errors

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
This commit is contained in:
Clark Wang 2014-12-10 19:43:55 +08:00
parent 7a3e254403
commit 9c147f1b25
2 changed files with 4 additions and 4 deletions

View File

@ -677,7 +677,7 @@ Model.nestRemoting = function(relationName, options, cb) {
try { try {
nestedFn.apply(inst, args); nestedFn.apply(inst, args);
} catch (err) { } catch (err) {
cb && cb(err); if (cb) return cb(err);
} }
} else if (cb) { } else if (cb) {
cb(err, null); cb(err, null);
@ -695,7 +695,7 @@ Model.nestRemoting = function(relationName, options, cb) {
try { try {
nestedFn.apply(inst, args); nestedFn.apply(inst, args);
} catch (err) { } catch (err) {
cb && cb(err); if (cb) return cb(err);
} }
} else if (cb) { } else if (cb) {
cb(err, null); cb(err, null);

View File

@ -1169,7 +1169,7 @@ describe('relations - integration', function() {
Image.belongsTo(Book); Image.belongsTo(Book);
// fake a remote method that match the filter in Model.nestRemoting() // 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'); throw new Error('This should not crash the app');
}; };