FilesystemBrowserTextbox: use || to take empty string into account

This commit is contained in:
Jesse Chan
2021-02-08 15:29:38 +00:00
parent 44e3252779
commit ddfbdd9fde
@@ -35,9 +35,9 @@ const FilesystemBrowserTextbox = forwardRef<HTMLInputElement, FilesystemBrowserT
ref,
) => {
const [destination, setDestination] = useState<string>(
suggested ??
SettingStore.floodSettings.torrentDestinations?.[''] ??
SettingStore.clientSettings?.directoryDefault ??
suggested ||
SettingStore.floodSettings.torrentDestinations?.[''] ||
SettingStore.clientSettings?.directoryDefault ||
'',
);
const [isDirectoryListOpen, setIsDirectoryListOpen] = useState<boolean>(false);