diff --git a/packages/ses/src/commons.js b/packages/ses/src/commons.js index fd9debf411..0c68dd45d2 100644 --- a/packages/ses/src/commons.js +++ b/packages/ses/src/commons.js @@ -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