Skip to content

Commit d223b45

Browse files
authored
Modify preserveDestructuring default behavior
Updated the logic for preserveDestructuring option to default to true if not specified.
1 parent 1449daa commit d223b45

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/react-native-babel-preset/src/configs

‎packages/react-native-babel-preset/src/configs/main.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ const getPreset = (src, options, babel) => {
147147
options.customTransformOptions?.unstable_preserveBlockScoping,
148148
);
149149

150-
// Preserve destructuring syntax if the experiment is enabled.
150+
// Preserve destructuring syntax if the experiment is enabled. (no transform destructuring syntax by default)
151151
const preserveDestructuring = TRUE_VALS.has(
152-
options.customTransformOptions?.unstable_preserveDestructuring,
152+
options.customTransformOptions?.unstable_preserveDestructuring ?? true,
153153
);
154154

155155
const isNull = src == null;

0 commit comments

Comments
 (0)