Commit 12f8240
fix(web): add type guard to prevent crash with 'constructor' folder name (#862)
* 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>
* changelog and nits
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Brendan Kellam <brendan-kellam@users.noreply.github.com>1 parent 0c2fe99 commit 12f8240
File tree
3 files changed
+7
-4
lines changed- packages/web/src/app/components
3 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments