Skip to content

Commit aac8005

Browse files
committed
fix(relationships): fix unhandled promise rejection warning
1 parent a07252b commit aac8005

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)