Skip to content

Commit

Permalink
Fix app crash in macos when selecting files in torrent creation window
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1ck committed Aug 8, 2023
1 parent e6964c0 commit 9761164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/createtorrentform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function CreateTorrentForm() {
const onBrowseFile = useCallback(() => {
dialog.open({
title: "Select file",
defaultPath: form.values.path,
defaultPath: form.values.path === "" ? undefined : form.values.path,
multiple: false,
}).then((path) => {
if (path === null) return;
Expand All @@ -123,7 +123,7 @@ export default function CreateTorrentForm() {
const onBrowseDirectory = useCallback(() => {
dialog.open({
title: "Select directory",
defaultPath: form.values.path,
defaultPath: form.values.path === "" ? undefined : form.values.path,
directory: true,
}).then((path) => {
if (path === null) return;
Expand Down

0 comments on commit 9761164

Please sign in to comment.