Skip to content

Commit a8568d4

Browse files
authored
fix: correct condition check for exact device matches in findDeviceByName function (#66)
1 parent 024429c commit a8568d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/applive-utils/device-search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function findDeviceByName(
2020
const exact = matches.filter(
2121
(m) => m.display_name.toLowerCase() === desiredPhone.toLowerCase(),
2222
);
23-
if (exact) return exact;
23+
if (exact.length) return exact;
2424
// If no exact but multiple fuzzy, ask user
2525
if (matches.length > 1) {
2626
const names = matches.map((d) => d.display_name).join(", ");

0 commit comments

Comments
 (0)