Skip to content

Commit

Permalink
Satisfy eslint
Browse files Browse the repository at this point in the history
Signed-off-by: Darshan Sen <[email protected]>
  • Loading branch information
RaisinTen committed Nov 20, 2024
1 parent 8496201 commit 26defba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/runner/extensions/event.command.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ postProcessContext = function (execution, failures) { // function determines whe
return undefined;

Check warning on line 47 in lib/runner/extensions/event.command.js

View check run for this annotation

Codecov / codecov/patch

lib/runner/extensions/event.command.js#L47

Added line #L47 was not covered by tests
}
const serialisedError = require('serialised-error');

return serialisedError(error, true);
};

Expand Down Expand Up @@ -475,8 +476,8 @@ module.exports = {
// instance once it is fully supported
result && { cookies: result.cookies });
}).catch(function (err) {
const serialisedError = require('serialised-error');
const error = serialisedError(err);
const serialisedError = require('serialised-error'),
error = serialisedError(err);

delete error.stack; // remove stack to avoid leaking runtime internals
this.host.dispatch(EXECUTION_RESPONSE_EVENT_BASE + id, requestId, error);
Expand Down Expand Up @@ -528,6 +529,7 @@ module.exports = {
// electron IPC does not bubble errors to the browser process, so we serialize it here.
if (err) {
const serialisedError = require('serialised-error');

err = serialisedError(err, true);
}

Expand Down

0 comments on commit 26defba

Please sign in to comment.