mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(element-handle): remove throw in case of empty elementHandle (#2740)
Fixes #2708
This commit is contained in:
committed by
Andrey Lushnikov
parent
38f112f395
commit
9a650c818d
@@ -306,8 +306,6 @@ class ElementHandle extends JSHandle {
|
||||
(element, selector) => Array.from(element.querySelectorAll(selector)),
|
||||
this, selector
|
||||
);
|
||||
if (!(await arrayHandle.jsonValue()).length)
|
||||
throw new Error(`Error: failed to find elements matching selector "${selector}"`);
|
||||
|
||||
const result = await this.executionContext().evaluate(pageFunction, arrayHandle, ...args);
|
||||
await arrayHandle.dispose();
|
||||
|
||||
Reference in New Issue
Block a user