refactor(desktop-shell-menu): drop dead '?? ""' defense in openPath
This commit is contained in:
1 parent
1ccf31f6d7
commit
4ed1e47c32
1 file changed
+3
-2
@@ -67,8 +67,9 @@ export function createDesktopShellMenu(deps: DesktopShellMenuDependencies) {
|
|||||||
const result = await dialog.showOpenDialog({
|
const result = await dialog.showOpenDialog({
|
||||||
properties: ["openDirectory"],
|
properties: ["openDirectory"],
|
||||||
});
|
});
|
||||||
if (result.canceled || result.filePaths.length === 0) return;
|
const targetPath = result.filePaths[0];
|
||||||
shell.openPath(result.filePaths[0] ?? "");
|
if (result.canceled || !targetPath) return;
|
||||||
|
shell.openPath(targetPath);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
|
|||||||
Reference in new issue
Block a user