We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b72ea5 commit d65a834Copy full SHA for d65a834
1 file changed
packages/quick-open/src/common/icon.ts
@@ -2,9 +2,7 @@ import { URI } from '@opensumi/ide-core-common';
2
3
export function iconPath2URI(iconPath: URI | { light: URI; dark: URI }, themeType?: string): URI | undefined {
4
if (URI.isUri(iconPath)) {
5
- const tmpIconPath = iconPath as URI;
6
-
7
- return Object.prototype.hasOwnProperty.call(tmpIconPath, 'codeUri') ? tmpIconPath : new URI(tmpIconPath.toString());
+ return 'codeUri' in iconPath ? iconPath : new URI((iconPath as URI).toString());
8
}
9
10
if ((iconPath.dark || iconPath.light) && themeType) {
0 commit comments