Skip to content

Commit

Permalink
Fix an issue when objectName might be not a type of string (#1089)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Sworroo and prakashsvmx authored Feb 28, 2023
1 parent b48296e commit cf18f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit cf18f94

Please sign in to comment.