feat: use fallback if too many combinations found

This commit is contained in:
karishmas6
2024-06-05 22:19:52 +05:30
parent 76ff3392d3
commit 6dda179409

View File

@@ -256,6 +256,14 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
): Path | null { ): Path | null {
const paths = sort(combinations(stack)); const paths = sort(combinations(stack));
if (paths.length > config.threshold) {
return fallback ? fallback() : null;
}
return null;
}
}; };