Skip to content

Commit 46ad1f1

Browse files
committed
fix apply() argumentsList not being Array
1 parent 7019ec0 commit 46ad1f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/node/node-wsh.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ export class WindowsScriptingHost extends EventEmitter {
6161
return undefined;
6262
},
6363

64-
apply( target, thisArg, argumentList) {
64+
apply( target, thisArg, argumentsList) {
6565
const encodedTarget = this.wsh.#encode( target.proxy);
6666
const encodedThisArg = this.wsh.#encode( thisArg);
67-
const encodedArgumentList = this.wsh.#encode( argumentList);
67+
const encodedArgumentList = this.wsh.#encode( [ ...argumentsList]); // argumentList may not be instanceof Array
6868
const output = JSON.parse( this.wsh.#syncline.exchange( JSON.stringify( [ 'apply', encodedTarget, encodedThisArg, encodedArgumentList])));
6969
switch( output[ 0]) {
7070
case 'value': return this.wsh.#decode( output[ 1]);

0 commit comments

Comments
 (0)