Skip to content

Commit

Permalink
fix: add missing await in adoptIfNeeded (#32497)
Browse files Browse the repository at this point in the history
Otherwise it throws in Bidi.
  • Loading branch information
yury-s authored Sep 6, 2024
1 parent d85527e commit 11441c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/playwright-core/src/server/frameSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class FrameSelectors {
async function adoptIfNeeded<T extends Node>(handle: ElementHandle<T>, context: FrameExecutionContext): Promise<ElementHandle<T>> {
if (handle._context === context)
return handle;
const adopted = handle._page._delegate.adoptElementHandle(handle, context);
const adopted = await handle._page._delegate.adoptElementHandle(handle, context);
handle.dispose();
return adopted;
}

0 comments on commit 11441c0

Please sign in to comment.