We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ed991d commit 052785bCopy full SHA for 052785b
1 file changed
src/components/fileicon.tsx
@@ -84,8 +84,8 @@ export function FileIcon({ name, selected }: { name: string, selected: boolean }
84
const theme = useMantineTheme();
85
86
const ext = name.substring(name.lastIndexOf(".") + 1).toLowerCase();
87
- const FileIcon = Object.hasOwn(extensions, ext) ? extensions[ext].icon : Icon.FileEarmark;
88
- const color = Object.hasOwn(extensions, ext) ? extensions[ext].color : "gray";
+ const FileIcon = Object.prototype.hasOwnProperty.call(extensions, ext) ? extensions[ext].icon : Icon.FileEarmark;
+ const color = Object.prototype.hasOwnProperty.call(extensions, ext) ? extensions[ext].color : "gray";
89
const shade = (theme.colorScheme === "dark" || selected) ? 3 : 9;
90
91
return <FileIcon size="1.1rem" color={theme.colors[color][shade]} />;
0 commit comments