From ddfbdd9fde26f7b67fc1cbed707d701a18d5ba0e Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Mon, 8 Feb 2021 15:29:38 +0000 Subject: [PATCH] FilesystemBrowserTextbox: use || to take empty string into account --- .../general/form-elements/FilesystemBrowserTextbox.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx b/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx index 9136b05f..39a576e8 100644 --- a/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx +++ b/client/src/javascript/components/general/form-elements/FilesystemBrowserTextbox.tsx @@ -35,9 +35,9 @@ const FilesystemBrowserTextbox = forwardRef { const [destination, setDestination] = useState( - suggested ?? - SettingStore.floodSettings.torrentDestinations?.[''] ?? - SettingStore.clientSettings?.directoryDefault ?? + suggested || + SettingStore.floodSettings.torrentDestinations?.[''] || + SettingStore.clientSettings?.directoryDefault || '', ); const [isDirectoryListOpen, setIsDirectoryListOpen] = useState(false);