From 711f09f9fe5ea76f4b04a7f5d152215568ba582f Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:49:46 -0400 Subject: [PATCH] fix crashing issues --- src/equicordplugins/components.dev/index.tsx | 12 +++++++----- src/equicordplugins/holyNotes/index.tsx | 3 +-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/equicordplugins/components.dev/index.tsx b/src/equicordplugins/components.dev/index.tsx index 333b1d2e1..2c6633786 100644 --- a/src/equicordplugins/components.dev/index.tsx +++ b/src/equicordplugins/components.dev/index.tsx @@ -25,7 +25,11 @@ export let ManaDatePicker: React.ComponentType; export let ManaCalendar: React.ComponentType; export let ManaSwitch: React.ComponentType; export let SimpleErrorBoundary: React.ComponentType; -export let ColorPicker: React.ComponentType; + +export let ColorPicker: React.ComponentType = () => null; +export function setColorPicker(component: React.ComponentType) { + ColorPicker = component; +} export default definePlugin({ name: "Components", @@ -100,7 +104,7 @@ export default definePlugin({ { find: "#{intl::zksHZO::raw}", replacement: { - match: /(?=class (\i).{0,90}getDerivedStateFromError)/, + match: /(?<=class (\i).{0,90}getDerivedStateFromError.*?this.props.children\}\})/, replace: "$self.SimpleErrorBoundary=$1;" } }, @@ -139,9 +143,7 @@ export default definePlugin({ set SimpleErrorBoundary(value: any) { SimpleErrorBoundary = value; }, - set ColorPicker(value: any) { - ColorPicker = value; - }, + setColorPicker, startAt: StartAt.WebpackReady, toolboxActions: { "Open Components Tab"() { diff --git a/src/equicordplugins/holyNotes/index.tsx b/src/equicordplugins/holyNotes/index.tsx index 56dfd4b5c..937f06e14 100644 --- a/src/equicordplugins/holyNotes/index.tsx +++ b/src/equicordplugins/holyNotes/index.tsx @@ -68,7 +68,6 @@ function ToolBarHeader() { } export let ChannelMessage; - export default definePlugin({ name: "HolyNotes", description: "Save messages as notes to revisit later", @@ -81,7 +80,7 @@ export default definePlugin({ replacement: [ { // Append messagelogger-deleted to classNames if deleted - match: /(?=let (\i)=\i\.memo\(function\(\i\)\{.{0,200}\.THREAD_STARTER_MESSAGE)/, + match: /(?<=let (\i)=\i\.memo\(function\(\i\)\{.{0,200}\.THREAD_STARTER_MESSAGE.*?bg-flash-.{0,10}:\i\}\);)/, replace: "ChannelMessage=$1;" }, ],