fix(lib/modules/metro/utils): detect proxies better in isModuleExportBad
This commit is contained in:
parent
66465552bb
commit
3ac922a817
1 changed files with 6 additions and 2 deletions
|
|
@ -50,7 +50,11 @@ export function isModuleExportBad(
|
||||||
return (
|
return (
|
||||||
// Nullish?
|
// Nullish?
|
||||||
exp == null ||
|
exp == null ||
|
||||||
// Does it have some non-existent key? (Turbo modules)
|
// Does it have some non-existent key? (proxies)
|
||||||
(typeof exp === 'object' && CATCH_ALL_TEST in exp)
|
(typeof exp === 'object' &&
|
||||||
|
// Implementing Reflect.get
|
||||||
|
(exp[CATCH_ALL_TEST] !== undefined ||
|
||||||
|
// Implementing Reflect.ownKeys
|
||||||
|
CATCH_ALL_TEST in exp))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue