Ensure babel-preset-env targets input object is not mutated (#7438)

This commit is contained in:
Guy Bedford 2018-02-27 16:46:24 +02:00 committed by Brian Ng
parent 5459c75d64
commit f004972625

View File

@ -169,7 +169,7 @@ export default function normalizeOptions(opts: Options) {
false,
),
spec: validateBoolOption("loose", opts.spec, false),
targets: opts.targets,
targets: Object.assign({}, opts.targets),
useBuiltIns: validateUseBuiltInsOption(opts.useBuiltIns),
};
}