Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -14,7 +14,8 @@ function persistentStorage(id: string | number, type: 'add' | 'remove' | undefin | @@ -14,7 +14,8 @@ function persistentStorage(id: string | number, type: 'add' | 'remove' | undefin | ||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | function hasClicked(id: string | number) { | 16 | function hasClicked(id: string | number) { |
| 17 | - let clickedIds = AppStorage.get<string>('clickedIds')?.split(',') || []; | 17 | + let _clickedIds = AppStorage.get<string[]>('clickedIds'); |
| 18 | + let clickedIds = _clickedIds?.toString()?.split(',') || []; | ||
| 18 | let index = clickedIds.indexOf(id.toString()) | 19 | let index = clickedIds.indexOf(id.toString()) |
| 19 | if (index >= 0) return true; | 20 | if (index >= 0) return true; |
| 20 | return false; | 21 | return false; |
-
Please register or login to post a comment