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 (
|
||||
// Nullish?
|
||||
exp == null ||
|
||||
// Does it have some non-existent key? (Turbo modules)
|
||||
(typeof exp === 'object' && CATCH_ALL_TEST in exp)
|
||||
// Does it have some non-existent key? (proxies)
|
||||
(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