Skip to content

Commit cb7d3be

Browse files
authored
Merge pull request #250 from digitalsadhu/fix_unhandled_promise_rejection_issue
fix(relationships): fix unhandled promise rejection warning
2 parents a07252b + aac8005 commit cb7d3be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/relationships.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ module.exports = function (app, options) {
4141
id = ctx.result.data.id
4242
data = options.data
4343
model = utils.getModelFromContext(ctx, app)
44-
return relationships(model, id, data)
45-
.then(() => next())
46-
.catch(err => next(err))
44+
relationships(model, id, data).then(() => next()).catch(err => next(err))
45+
return
4746
}
4847

4948
next()

0 commit comments

Comments
 (0)