From 0be8c156ab1e64940c32f8f745a5364e560768a4 Mon Sep 17 00:00:00 2001 From: estevez-dev Date: Mon, 25 May 2020 19:10:31 +0300 Subject: [PATCH] fix for bool --- functions/worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/worker.js b/functions/worker.js index 3e8c3f9..4c5a4d9 100644 --- a/functions/worker.js +++ b/functions/worker.js @@ -61,7 +61,7 @@ module.exports = { payload.data.imageUrl = req.body.data.image; } for (const key of ['color', 'channelId', 'image', 'tag', 'dismiss', 'autoDismiss']) { - if (req.body.data[key] !== null) { + if (req.body.data[key] !== null && typeof req.body.data[key] !== 'undefined') { payload.data[key] = String(req.body.data[key]) } }