1
0
Fork 0

fix(backend): Typo when saving patterns

This commit is contained in:
joostdecock 2023-09-26 18:28:20 +02:00
parent 63aae59dcc
commit 2c7223ae19

View file

@ -102,7 +102,8 @@ PatternModel.prototype.guardedCreate = async function ({ body, user }) {
setId: body.set ? body.set : null,
settings: {
...body.settings,
measurements: body.settings.measurements === 'object' ? body.settings.measurements : {},
measurements:
typeof body.settings.measurements === 'object' ? body.settings.measurements : {},
},
userId: user.uid,
name: typeof body.name === 'string' && body.name.length > 0 ? body.name : '--',