Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/snaps-execution-environments/coverage.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"branches": 90.74,
"branches": 90.78,
"functions": 94.96,
"lines": 90.86,
"statements": 90.28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ export class BaseSnapExecutor {
return null;
}

let result = await this.executeInSnapContext(target, async () =>
const result = await this.executeInSnapContext(target, async () =>
// TODO: fix handler args type cast
handler(args as any),
);

// The handler might not return anything, but undefined is not valid JSON.
if (result === undefined) {
result = null;
if (result === undefined || result === null) {
return null;
}

// /!\ Always return only sanitized JSON to prevent security flaws. /!\
Expand Down
Loading