Skip to content

Commit

Permalink
refactor(ses): stricten commons async gen fn instance error cond
Browse files Browse the repository at this point in the history
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
  • Loading branch information
leotm and legobeat committed Sep 11, 2024
1 parent cdd2dad commit 5ca94cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ses/src/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ try {
'return (async function* AsyncGeneratorFunctionInstance() {})',
)();
} catch (e) {
if (e.name === 'SyntaxError') {
if (Error.prototype.jsEngine === 'hermes' && e.name === 'SyntaxError') {
// Swallows Hermes error `async generators are unsupported` at runtime.
// @ts-ignore
// eslint-disable-next-line no-undef
Expand Down

0 comments on commit 5ca94cb

Please sign in to comment.