fix: fallback to CSS (#9876)
This commit is contained in:
parent
aa7c475461
commit
e6ec9c2958
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
import type {AwaitableIterable} from '../common/types.js';
|
import type {AwaitableIterable} from '../common/types.js';
|
||||||
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
|
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
|
||||||
import {isErrorLike} from '../util/ErrorLike.js';
|
|
||||||
|
|
||||||
import {ariaQuerySelectorAll} from './ARIAQuerySelector.js';
|
import {ariaQuerySelectorAll} from './ARIAQuerySelector.js';
|
||||||
import {customQuerySelectors} from './CustomQuerySelector.js';
|
import {customQuerySelectors} from './CustomQuerySelector.js';
|
||||||
@ -251,10 +250,7 @@ export const pQuerySelectorAll = function (
|
|||||||
try {
|
try {
|
||||||
[selectors, isPureCSS] = parsePSelectors(selector);
|
[selectors, isPureCSS] = parsePSelectors(selector);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!isErrorLike(error)) {
|
return (root as unknown as QueryableNode).querySelectorAll(selector);
|
||||||
throw new SelectorError(selector, String(error));
|
|
||||||
}
|
|
||||||
throw new SelectorError(selector, error.message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPureCSS) {
|
if (isPureCSS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user