From cf18f94ce057b88b15521959012259832b783fc2 Mon Sep 17 00:00:00 2001 From: NotAura Date: Tue, 28 Feb 2023 06:59:39 +0300 Subject: [PATCH] Fix an issue when objectName might be not a type of string (#1089) * Fix an issue when objectName might be not a type of string * Fix test passing * Fix for pass tests --------- Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com> --- src/main/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/helpers.js b/src/main/helpers.js index 91cf23ab..50865b5c 100644 --- a/src/main/helpers.js +++ b/src/main/helpers.js @@ -424,7 +424,7 @@ export const toArray = (param) => { export const sanitizeObjectKey=(objectName)=>{ // + symbol characters are not decoded as spaces in JS. so replace them first and decode to get the correct result. - let asStrName= (objectName || "").replace(/\+/g, ' ') + let asStrName = (objectName ? objectName.toString() : "").replace(/\+/g, ' ') const sanitizedName = decodeURIComponent(asStrName) return sanitizedName }