Skip to content

Commit

Permalink
fix: null optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed Jul 30, 2024
1 parent b31ecd6 commit 71e632e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/mounts/virtualDrive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ export const VirtualDrive = memo(() => {
setEnablingVirtualDrive(true)

try {
if (
window.desktopAPI.platform() !== "win32" &&
!(await window.desktopAPI.verifyUnixMountPath(desktopConfig.virtualDriveConfig.mountPoint))
) {
if (window.desktopAPI.platform() !== "win32" && !(await window.desktopAPI.verifyUnixMountPath(mountPoint))) {
errorToast(t("mounts.virtualDrive.errors.invalidMountPoint"))

return
Expand All @@ -124,7 +121,7 @@ export const VirtualDrive = memo(() => {
...prev,
virtualDriveConfig: {
...prev.virtualDriveConfig,
mountPoint
mountPoint: mountPoint!
}
}))
} catch (e) {
Expand Down

0 comments on commit 71e632e

Please sign in to comment.