Commit c1f238d0 authored by A. Koch's avatar A. Koch

only set profile when result is not undefined

parent a30f38bc
......@@ -10,7 +10,7 @@ const setup = async function (api, profileService) {
user: req.user
}
const result = await profileService.getHandler(r)
req.user.profile = ObjectUtil.merge({}, req.user.profile, result.data)
req.user.profile = ObjectUtil.merge({}, req.user.profile, result ? result.data : undefined)
if (req.method.toLowerCase() === 'post') {
req.body.author = {
id: req.user.uuid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment