Skip to content

Commit aea2d11

Browse files
authored
Merge pull request #47 from HenryRoutson/fix_no_mount
fix: prevent panic on thread if no mount is selected
2 parents 80c1145 + cd8ee34 commit aea2d11

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/TopBar/SearchBar.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ export default function SearchBar({
3232
const currentPlace = split[split.length - 2];
3333

3434
async function onSearch() {
35+
if (currentVolume.length == 0) {
36+
alert("Please select a volume before searching.");
37+
return;
38+
}
39+
3540
const results = await invoke<DirectoryContent[]>("search_directory", {
3641
query: searchValue,
3742
searchDirectory: currentDirectoryPath,

0 commit comments

Comments
 (0)