Avoid mutating the passed-in options for babel-register (#6542)
This commit is contained in:
parent
70818c3db8
commit
11d8e0555f
@ -97,6 +97,8 @@ register({
|
||||
});
|
||||
|
||||
export default function register(opts?: Object = {}) {
|
||||
// Clone to avoid mutating the arguments object with the 'delete's below.
|
||||
opts = Object.assign({}, opts);
|
||||
if (opts.extensions) hookExtensions(opts.extensions);
|
||||
|
||||
if (opts.cache === false) cache = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user