Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 269b896

Browse files
committed
fix unpatch bug
1 parent 8119564 commit 269b896

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/common/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,8 @@ export function generateUnPatchAndRePatch(patches: [{target: any, methods: strin
459459
unPatchFn: () => {
460460
patches.forEach(patch => {
461461
patch.methods.forEach(m => {
462-
const originalDelegate = patch.target[zoneSymbol(m)];
462+
const method = patch.target[m];
463+
const originalDelegate = method && (method as any)[zoneSymbol('OriginalDelegate')];
463464
if (originalDelegate) {
464465
patch.target[m] = originalDelegate;
465466
}

0 commit comments

Comments
 (0)