Skip to content

Commit

Permalink
fix(ses): XS accommodations for console groupEnd absence
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Sep 27, 2024
1 parent 74be919 commit 51993b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/ses/src/error/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ export const makeCausalConsole = (baseConsole, loggedErrorHandler) => {
logError(severity, subError);
}
} finally {
// eslint-disable-next-line @endo/no-polymorphic-call
baseConsole.groupEnd();
if (baseConsole.groupEnd) {
// eslint-disable-next-line @endo/no-polymorphic-call
baseConsole.groupEnd();
}
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ses/src/permits-intrinsics.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export default function whitelistIntrinsics(
// removed from the global object by the whitelisting operation.
visitProperties('intrinsics', intrinsics, permitted);
} finally {
if (groupStarted) {
if (groupStarted && console.groupEnd) {
// eslint-disable-next-line @endo/no-polymorphic-call
console.groupEnd();
}
Expand Down

0 comments on commit 51993b9

Please sign in to comment.