summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js')
-rw-r--r--tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js
index f749c09da0..bad40f8a17 100644
--- a/tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js
+++ b/tools/node_modules/eslint/node_modules/@babel/helper-plugin-utils/lib/index.js
@@ -8,14 +8,18 @@ exports.declarePreset = void 0;
const apiPolyfills = {
assertVersion: api => range => {
throwVersionError(range, api.version);
- },
- targets: () => () => {
- return {};
- },
- assumption: () => () => {
- return undefined;
}
};
+{
+ Object.assign(apiPolyfills, {
+ targets: () => () => {
+ return {};
+ },
+ assumption: () => () => {
+ return undefined;
+ }
+ });
+}
function declare(builder) {
return (api, options, dirname) => {
var _clonedApi2;
@@ -23,11 +27,9 @@ function declare(builder) {
for (const name of Object.keys(apiPolyfills)) {
var _clonedApi;
if (api[name]) continue;
-
- clonedApi = (_clonedApi = clonedApi) != null ? _clonedApi : copyApiObject(api);
+ (_clonedApi = clonedApi) != null ? _clonedApi : clonedApi = copyApiObject(api);
clonedApi[name] = apiPolyfills[name](clonedApi);
}
-
return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname);
};
}