Added fix to solve the id TypeError (#19810)

Co-authored-by: amrit <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: Tushar Bhatt <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-03-07 14:26:36 +00:00
1 parent e81df6fdeb
commit d40d282912
1 file changed
+3 -1
+3 -1
View File
@@ -173,9 +173,11 @@ function Tips() {
const items = localStorage.getItem("removedTipsIds") || "";
const itemToRemoveIndex = currentItems.findIndex((item) => item.id === id);
if (itemToRemoveIndex === -1) return [...currentItems];
localStorage.setItem(
"removedTipsIds",
`${currentItems[itemToRemoveIndex].id.toString()}${items.length > 0 ? `,${items.split(",")}` : ""}`
`${currentItems[itemToRemoveIndex].id.toString()}${items.length > 0 ? `,${items}` : ""}`
);
currentItems.splice(itemToRemoveIndex, 1);
return [...currentItems];