Skip to content

Commit f607c45

Browse files
committed
driver exact match
1 parent cbf2498 commit f607c45

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/compute-download-urls.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ async function getLastChromedriverVersionFromMajor(version) {
288288
},
289289
},
290290
}).json();
291-
const versionsWithMajor = response.versions.filter(
291+
292+
const exactMatch = response.versions.find((f) => f.version === version && 'chromedriver' in f.downloads);
293+
// If exact match is found, return it
294+
if (exactMatch) {
295+
return exactMatch;
296+
}
297+
const versionsWithMajor = response.body.versions.filter(
292298
(f) =>
293299
validateMajorVersionPrefix(f.version) === validateMajorVersionPrefix(version) && 'chromedriver' in f.downloads
294300
);

0 commit comments

Comments
 (0)