diff --git a/src/util/patcher/notices.js b/src/util/patcher/notices.js index 582062dd..5e150c00 100644 --- a/src/util/patcher/notices.js +++ b/src/util/patcher/notices.js @@ -43,8 +43,7 @@ export const setThisScope = async (scope) => { } PatcherBase.patch(baseOwnerInstance.props.children[0], 'type', (_args, ret) => { - ret.props.children[1].props.children[1].props.children.props.children.unshift(React.createElement(NoticeContainer)); - + goosemod.reactUtils.findInReactTree(ret, x => x.className === BaseClasses.base).children.unshift(React.createElement(NoticeContainer)); return ret; }); @@ -91,4 +90,4 @@ export const patch = (content, buttonText, clickHandler, colorKey = 'brand') => }); updateCall(); -}; \ No newline at end of file +};