Fix "injectErrorPageUseEffect" patch (not showing Error page)

This commit is contained in:
redphx 2025-05-29 20:59:31 +07:00
parent 3d6688e1db
commit 3bb138cd05
3 changed files with 3 additions and 3 deletions

View File

@ -5662,7 +5662,7 @@ ${subsVar} = subs;
injectErrorPageUseEffect(str) {
let index = str.indexOf('"PureErrorPage-module__container');
if (index > -1 && (index = PatcherUtils.lastIndexOf(str, "})=>(0,", index, 200)), index < 0) return !1;
return str = PatcherUtils.insertAt(str, index + 4, "{"), str = PatcherUtils.injectUseEffect(str, index + 5, "Script", "ui.error.rendered"), str += "}", str;
return str = PatcherUtils.insertAt(str, index + 4, "{return "), str = PatcherUtils.injectUseEffect(str, index + 5, "Script", "ui.error.rendered"), str += "}", str;
},
injectStreamMenuUseEffect(str) {
let index = str.indexOf('"StreamMenu-module__container');

File diff suppressed because one or more lines are too long

View File

@ -1127,7 +1127,7 @@ ${subsVar} = subs;
return false;
}
str = PatcherUtils.insertAt(str, index + 4, '{');
str = PatcherUtils.insertAt(str, index + 4, '{return ');
str = PatcherUtils.injectUseEffect(str, index + 5, 'Script', 'ui.error.rendered');
str += '}';
return str;