diff --git a/src/plugins/accountPanelServerProfile/index.tsx b/src/plugins/accountPanelServerProfile/index.tsx index 30403f84..2b212d34 100644 --- a/src/plugins/accountPanelServerProfile/index.tsx +++ b/src/plugins/accountPanelServerProfile/index.tsx @@ -81,8 +81,8 @@ export default definePlugin({ replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},originalRenderPopout:()=>{${originalPopout}}})` }, { - match: /\.AVATAR,children:.+?(?=renderPopout:)/, - replace: "$&onRequestClose:$self.onPopoutClose," + match: /\.AVATAR,children:.+?onRequestClose:\(\)=>\{/, + replace: "$&$self.onPopoutClose();" }, { match: /(?<=#{intl::SET_STATUS}\),)/,