fix: Cannot read property 'tasks' of undefined

This commit is contained in:
kmmiio99o 2026-07-24 14:45:29 +02:00
parent 4ac8be74eb
commit a526a36443
No known key found for this signature in database
GPG key ID: DCC0431E10FADBF1

View file

@ -37,9 +37,17 @@ export function patchEmpty(
return false;
}
const orig = mod.type;
const originalComponent = orig;
mod.type = function EmptyPatch() {
return null;
};
if (originalComponent) {
Object.defineProperties(mod.type, Object.getOwnPropertyDescriptors(originalComponent));
mod.type.displayName = name;
}
cleanups.push(() => { mod.type = orig; });
return true;
}