Skip to content

Commit

Permalink
fix: fallback to CSS (puppeteer#9876)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf committed Mar 17, 2023
1 parent aa7c475 commit e6ec9c2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/puppeteer-core/src/injected/PQuerySelector.ts
Expand Up @@ -16,7 +16,6 @@

import type {AwaitableIterable} from '../common/types.js';
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
import {isErrorLike} from '../util/ErrorLike.js';

import {ariaQuerySelectorAll} from './ARIAQuerySelector.js';
import {customQuerySelectors} from './CustomQuerySelector.js';
Expand Down Expand Up @@ -251,10 +250,7 @@ export const pQuerySelectorAll = function (
try {
[selectors, isPureCSS] = parsePSelectors(selector);
} catch (error) {
if (!isErrorLike(error)) {
throw new SelectorError(selector, String(error));
}
throw new SelectorError(selector, error.message);
return (root as unknown as QueryableNode).querySelectorAll(selector);
}

if (isPureCSS) {
Expand Down

0 comments on commit e6ec9c2

Please sign in to comment.