Fixing error where focusing on an empty Directory search would throw an error.

This commit is contained in:
Roland 2026-06-24 15:23:32 -06:00
parent bf1ec42cc7
commit 16070e98b3
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
3 changed files with 30 additions and 4 deletions

View file

@ -1200,8 +1200,9 @@ export const useSearchDirectories = (value) => {
}, [directoryName]);
useEffect(() => {
// Directory value was changed above.
setDirectoryName(value);
// Directory value was changed above. Coerce null/undefined (an unset form field) to an
// empty string so the controlled input stays controlled and never builds a null result.
setDirectoryName(value ?? '');
}, [value]);
return {