From a71dd7d0eb4c5e5003ff9743bcceab43ba2897c3 Mon Sep 17 00:00:00 2001 From: maxxus <66540504+MaxxusX@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:41:21 -0600 Subject: [PATCH] fix(ui/components/ErrorBoundaryScreen): minor misspelling & update branding (#57) Co-authored-by: PalmDevs Co-authored-by: semantic-release-bot --- CHANGELOG.md | 5 +++++ src/core/ui/reporter/components/ErrorBoundaryScreen.tsx | 2 +- src/lib/api/react/jsx.ts | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44fa875..7cb5b75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.5.3](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.2...v1.5.3) (2024-12-05) + + +* backport iOS invalid element type crash fix ([afacfa0](https://github.com/revenge-mod/revenge-bundle/commit/afacfa06480f60d461840a211c09abb363dc8546)) + ## [1.5.3-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.2...v1.5.3-dev.1) (2024-11-24) diff --git a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx index af164ad..60dc43f 100644 --- a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx +++ b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx @@ -32,7 +32,7 @@ export default function ErrorBoundaryScreen(props: { Uh oh. - A crash occured while rendering a component. This could be caused by a plugin, Bunny or Discord itself. + A crash occurred while rendering a component. This could be caused by a plugin, Revenge or Discord itself. {debugInfo.os.name}; {debugInfo.discord.build} ({debugInfo.discord.version}); {debugInfo.bunny.version} diff --git a/src/lib/api/react/jsx.ts b/src/lib/api/react/jsx.ts index 571eebc..b3d025b 100644 --- a/src/lib/api/react/jsx.ts +++ b/src/lib/api/react/jsx.ts @@ -23,6 +23,12 @@ export function deleteJsxCreate(Component: string, callback: Callback) { */ export function patchJsx() { const callback = ([Component]: unknown[], ret: JSX.Element) => { + // Band-aid fix for iOS invalid element type crashes + if (typeof ret.type === 'undefined') { + ret.type = 'RCTView' + return ret + } + // The check could be more complex, but this is fine for now to avoid overhead if (typeof Component === "function" && callbacks.has(Component.name)) { const cbs = callbacks.get(Component.name)!;