Skip to content

Commit 615630d

Browse files
committed
fix: Link to functionCall() not callFunction()
1 parent 3b35a7c commit 615630d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class Gotham {
2020

2121
async functionCall(fnNmame: string, args: FnArgs) {
2222
return await this.protocol.sendRequest(
23-
this.protocol.functionCall(fnNmame, args)
23+
this.protocol.callFunction(fnNmame, args)
2424
);
2525
}
2626

src/protocol/protocol.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ export class Protocol {
145145
}
146146
}
147147

148-
callFunction(moduleId: string, functionName: string, ...args: FnArgs[]): FunctionCallRequest {
148+
callFunction(functionName: string, args: FnArgs): FunctionCallRequest {
149149
return {
150150
requestId: this.generateRequestId(),
151151
type: 'functionCall',
152-
function: `${moduleId}.${functionName}`,
152+
function: `${this.moduleId}.${functionName}`,
153153
arguments: args
154154
}
155155
}
@@ -164,7 +164,7 @@ export class Protocol {
164164

165165
functionCall(functionName: string, args: FnArgs) {
166166
if (this.functions[functionName]) {
167-
this.functions[functionName](...args);
167+
this.functions[functionName](args);
168168
}
169169
}
170170

@@ -197,11 +197,11 @@ export class Protocol {
197197
if (res instanceof Promise) {
198198
res = await res;
199199
}
200-
await this.sendRequest({
200+
this.sendRequest({
201201
requestId: obj.requestId,
202202
type: 'functionResponse',
203203
data: res
204-
}, ()=>{});
204+
});
205205
}
206206
}
207207

0 commit comments

Comments
 (0)