From 3235508792f1818af8030535624d3760ce44b43c Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 2 Apr 2024 19:04:50 +0200 Subject: [PATCH] Update GameActivityToggle.plugin.js --- Plugins/GameActivityToggle/GameActivityToggle.plugin.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Plugins/GameActivityToggle/GameActivityToggle.plugin.js b/Plugins/GameActivityToggle/GameActivityToggle.plugin.js index 5a39ebd696..cedc7f9993 100644 --- a/Plugins/GameActivityToggle/GameActivityToggle.plugin.js +++ b/Plugins/GameActivityToggle/GameActivityToggle.plugin.js @@ -2,7 +2,7 @@ * @name GameActivityToggle * @author DevilBro * @authorId 278543574059057154 - * @version 1.2.2 + * @version 1.2.3 * @description Adds a Quick-Toggle Game Activity Button * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -235,9 +235,10 @@ module.exports = (_ => { processAccount (e) { if (!this.settings.general.showButton) return; - let children = BDFDB.ObjectUtils.get(e.returnvalue, "props.children.1.props.children"); + let accountinfo = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.accountinfo]]}); + let children = accountinfo && BDFDB.ObjectUtils.get(accountinfo, "props.children.1.props.children"); if (children && children.length && BDFDB.ArrayUtils.is(children)) { - e.returnvalue.props.className = BDFDB.DOMUtils.formatClassName(e.returnvalue.props.className, BDFDB.disCN._gameactivitytoggleadded); + accountinfo.props.className = BDFDB.DOMUtils.formatClassName(accountinfo.props.className, BDFDB.disCN._gameactivitytoggleadded); children.unshift(BDFDB.ReactUtils.createElement(ActivityToggleComponent, {})); } }