Skip to content

Commit bdadc9b

Browse files
authored
fix: deal with delayed _nodeElectronHandle
also deal with electronDispatcher
1 parent 75207dc commit bdadc9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dispatchers/electronDispatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export class ElectronApplicationDispatcher extends Dispatcher<ElectronApplicatio
5050
}
5151

5252
async evaluateExpression(params: channels.ElectronApplicationEvaluateExpressionParams): Promise<channels.ElectronApplicationEvaluateExpressionResult> {
53-
const handle = this._object._nodeElectronHandle!;
53+
const handle = await this._object._nodeElectronHandle!;
5454
return { value: serializeResult(await handle.evaluateExpressionAndWaitForSignals(params.expression, params.isFunction, true /* returnByValue */, parseArgument(params.arg))) };
5555
}
5656

5757
async evaluateExpressionHandle(params: channels.ElectronApplicationEvaluateExpressionHandleParams): Promise<channels.ElectronApplicationEvaluateExpressionHandleResult> {
58-
const handle = this._object._nodeElectronHandle!;
58+
const handle = await this._object._nodeElectronHandle!;
5959
const result = await handle.evaluateExpressionAndWaitForSignals(params.expression, params.isFunction, false /* returnByValue */, parseArgument(params.arg));
6060
return { handle: ElementHandleDispatcher.fromJSHandle(this._scope, result) };
6161
}

0 commit comments

Comments
 (0)