From b8dd253d22a4262b93e4c32fa3615ce4d0ea3736 Mon Sep 17 00:00:00 2001 From: tech-sushant Date: Tue, 3 Jun 2025 16:55:37 +0530 Subject: [PATCH] fix: correct condition check for exact device matches in findDeviceByName function --- src/tools/applive-utils/device-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/applive-utils/device-search.ts b/src/tools/applive-utils/device-search.ts index 60ebc16..948920b 100644 --- a/src/tools/applive-utils/device-search.ts +++ b/src/tools/applive-utils/device-search.ts @@ -20,7 +20,7 @@ export function findDeviceByName( const exact = matches.filter( (m) => m.display_name.toLowerCase() === desiredPhone.toLowerCase(), ); - if (exact) return exact; + if (exact.length) return exact; // If no exact but multiple fuzzy, ask user if (matches.length > 1) { const names = matches.map((d) => d.display_name).join(", ");