fix: Cannot read property 'tasks' of undefined
This commit is contained in:
parent
4ac8be74eb
commit
a526a36443
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue