From 83d90f03ee5f9ae8eb876be676646d4e15ff6d94 Mon Sep 17 00:00:00 2001 From: ingobeans <127751491+ingobeans@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:56:51 +0200 Subject: [PATCH] FakeProfileThemes: fix crash when encountering invalid colours (#2714) --- src/plugins/fakeProfileThemes/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fakeProfileThemes/index.tsx b/src/plugins/fakeProfileThemes/index.tsx index 9e784da68..ab240837b 100644 --- a/src/plugins/fakeProfileThemes/index.tsx +++ b/src/plugins/fakeProfileThemes/index.tsx @@ -57,7 +57,7 @@ function decode(bio: string): Array | null { if (bio == null) return null; const colorString = bio.match( - /\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u, + /\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]{1,6})\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]{1,6})\u{e005d}/u, ); if (colorString != null) { const parsed = [...colorString[0]]