Fix ContextMenu Patcher

This commit is contained in:
Strencher 2022-10-12 22:08:27 +02:00
parent 1165043908
commit c0543586cb
1 changed files with 2 additions and 1 deletions

View File

@ -83,6 +83,7 @@ class MenuPatcher {
const proxyFunction = this.subPatches.get(target[method]) ?? (() => {
const originalFunction = target[method];
const depth = ++iteration;
function patch() {
const res = originalFunction.apply(this, arguments);
@ -95,7 +96,7 @@ class MenuPatcher {
const layer = res.props.children ? res.props.children : res;
if (typeof layer?.type == "function") {
MenuPatcher.patchRecursive(layer, "type", ++iteration);
MenuPatcher.patchRecursive(layer, "type", depth);
}
}