From ccf9a90f597228b3e167537aa057597a471e5e31 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Thu, 11 Jul 2024 23:30:34 -0400 Subject: [PATCH] Fix Section --- src/plugins/friendsSince/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index d3d755ef6..071ab1980 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -17,7 +17,15 @@ const container = findByPropsLazy("memberSince"); const getCreatedAtDate = findByCodeLazy('month:"short",day:"numeric"'); const locale = findByPropsLazy("getLocale"); const lastSection = findByPropsLazy("lastSection"); -const section = findLazy((m: any) => m.section !== void 0 && Object.values(m).length === 1) || findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2); +const { RELEASE_CHANNEL } = window.GLOBAL_ENV; + +let section; + +if (RELEASE_CHANNEL === "stable") { + section = findLazy((m: any) => m.section !== void 0 && Object.values(m).length === 1); +} else { + section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2); +} export default definePlugin({ name: "FriendsSince",