feat: use fallback if too many combinations found
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user