Commit 7686e08
fix: add type guard to prevent crash with 'constructor' folder name
Fixes #861
When a folder is named 'constructor', getIconForFolder returns an object
(Object.prototype.constructor) instead of a string, causing a runtime error
when calling .indexOf() on it. Added a type check to ensure the icon is a
string before processing.
Co-authored-by: Brendan Kellam <brendan-kellam@users.noreply.github.com>1 parent fec4211 commit 7686e08
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments