diff --git a/src/metro/internals/modules.ts b/src/metro/internals/modules.ts index e9f6e02..0b4cdf4 100644 --- a/src/metro/internals/modules.ts +++ b/src/metro/internals/modules.ts @@ -91,10 +91,12 @@ function onModuleRequire(moduleExports: any, id: Metro.ModuleID) { // There are modules registering the same native component if (!patchedNativeComponentRegistry && ["customBubblingEventTypes", "customDirectEventTypes", "register", "get"].every(x => moduleExports[x])) { - instead("register", moduleExports, (args: any, origFunc: any) => { + instead("register", moduleExports, ([name, cb]: any, origFunc: any) => { try { - return origFunc(...args); - } catch { } + return origFunc(name, cb); + } catch { + return name; + } }); patchedNativeComponentRegistry = true;