Skip to content

Commit 63d83fa

Browse files
committed
fix: Incorrect target for initializing execution
1 parent 5acb719 commit 63d83fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sandbox/execution.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Execution {
4343
});
4444

4545
if (options.initializeExecution) {
46-
const { request, response, message } = options.initializeExecution(this.target, context) || {};
46+
const { request, response, message } = options.initializeExecution(this.event.listen, context) || {};
4747

4848
this.request = request;
4949
this.response = response;
@@ -86,7 +86,7 @@ class Execution {
8686

8787
get target () {
8888
// Sanitize target for any protocol-specific prefixes such as `http:`, `grpc:` etc
89-
return (this.event.listen || PROPERTY.SCRIPT).split(/[:-]/)[0];
89+
return (this.event.listen || PROPERTY.SCRIPT).split(/[:-]/)[1];
9090
}
9191

9292
toJSON () {

0 commit comments

Comments
 (0)