mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 14:43:33 +03:00
fix(es/helpers): Override mistake in _interop_require_wildcard
(#8076)
**Related issue:** - https://github.com/babel/babel/issues/15995
This commit is contained in:
parent
4843266545
commit
1346528477
@ -17,7 +17,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var newObj = { __proto__: null };
|
||||
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
|
@ -16,7 +16,7 @@ export function _interop_require_wildcard(obj, nodeInterop) {
|
||||
|
||||
if (cache && cache.has(obj)) return cache.get(obj);
|
||||
|
||||
var newObj = {};
|
||||
var newObj = { __proto__: null };
|
||||
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
|
||||
for (var key in obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user