Skip to content

Commit

Permalink
Move for-of and ?? to hermes stable
Browse files Browse the repository at this point in the history
Summary: Title says it all.

Reviewed By: avp

Differential Revision: D27580110

fbshipit-source-id: cfee48ea8bfd68476b335194f717f0ae42d10ff3
  • Loading branch information
Huxpro authored and facebook-github-bot committed Apr 6, 2021
1 parent 3aca116 commit 31375f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/metro-react-native-babel-preset/src/configs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const getPreset = (src, options) => {
if (!isHermes && (isNull || src.indexOf('Object.assign')) !== -1) {
extraPlugins.push([require('@babel/plugin-transform-object-assign')]);
}
if (hasForOf) {
if (!isHermes && hasForOf) {
extraPlugins.push([
require('@babel/plugin-transform-for-of'),
{loose: true},
Expand All @@ -135,7 +135,7 @@ const getPreset = (src, options) => {
{loose: true},
]);
}
if (!isHermesCanary && (isNull || src.indexOf('??') !== -1)) {
if (!isHermes && (isNull || src.indexOf('??') !== -1)) {
extraPlugins.push([
require('@babel/plugin-proposal-nullish-coalescing-operator'),
{loose: true},
Expand Down

0 comments on commit 31375f7

Please sign in to comment.