Added fix to solve the id TypeError (#19810)

Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
This commit is contained in:
Harshit Singh
2025-03-07 14:26:36 +00:00
committed by GitHub
co-authored by amrit Udit Takkar Anik Dhabal Babu Tushar Bhatt
parent e81df6fdeb
commit d40d282912
+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];