diff --git a/controllers/apps/createApp.js b/controllers/apps/createApp.js index 5f4adba..a8208fa 100644 --- a/controllers/apps/createApp.js +++ b/controllers/apps/createApp.js @@ -9,7 +9,11 @@ const createApp = asyncWrapper(async (req, res, next) => { const { pinAppsByDefault } = await loadConfig(); let app; - let _body = { ...req.body, icon: req.body.icon.trim() }; + let _body = { ...req.body }; + + if (_body.icon) { + _body.icon = _body.icon.trim(); + } if (req.file) { _body.icon = req.file.filename;