diff --git a/libraries/app/src/index.tsx b/libraries/app/src/index.tsx index 91fb934..68cdec9 100644 --- a/libraries/app/src/index.tsx +++ b/libraries/app/src/index.tsx @@ -3,6 +3,7 @@ import { React, ReactNative } from '@revenge-mod/modules/common' import { findByName } from '@revenge-mod/modules/finders' import { BundleUpdaterManager } from '@revenge-mod/modules/native' import { createPatcherInstance } from '@revenge-mod/patcher' +import { ReactJSXLibrary } from '@revenge-mod/react/jsx' import { createLogger } from '@revenge-mod/utils/library' import type { Component, FC, ReactNode } from 'react' @@ -68,6 +69,12 @@ const unpatchCreateElement = patcher.after( const afterErrorBoundaryPatchable = ReactNative.Platform.OS === 'ios' ? afterAppRender : afterAppInitialize afterErrorBoundaryPatchable(async function patchErrorBoundary() { + // Patching ErrorBoundary causes the weird "Element type is invalid" error due to TextInputWrapper's children being undefined + // The reason for it being undefined is unknown, but it's not a problem on Android + // Using this patch on Android also breaks how the chat input bar avoids the keyboard + if (ReactNative.Platform.OS === 'ios') + ReactJSXLibrary.afterElementCreate('PortalKeyboardPlaceholderInner', () => null) + const { default: Screen } = await import('./components/ErrorBoundaryScreen') setImmediate(() => {