mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: add missing await in adoptIfNeeded (#32497)
Otherwise it throws in Bidi.
This commit is contained in:
parent
d85527e9f6
commit
11441c0fe1
@ -160,7 +160,7 @@ export class FrameSelectors {
|
|||||||
async function adoptIfNeeded<T extends Node>(handle: ElementHandle<T>, context: FrameExecutionContext): Promise<ElementHandle<T>> {
|
async function adoptIfNeeded<T extends Node>(handle: ElementHandle<T>, context: FrameExecutionContext): Promise<ElementHandle<T>> {
|
||||||
if (handle._context === context)
|
if (handle._context === context)
|
||||||
return handle;
|
return handle;
|
||||||
const adopted = handle._page._delegate.adoptElementHandle(handle, context);
|
const adopted = await handle._page._delegate.adoptElementHandle(handle, context);
|
||||||
handle.dispose();
|
handle.dispose();
|
||||||
return adopted;
|
return adopted;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user