From 269b89603485a83cc58a44bef9bdfe830918789c Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Mon, 30 Apr 2018 12:24:55 +0800 Subject: [PATCH] fix unpatch bug --- lib/common/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/common/utils.ts b/lib/common/utils.ts index 8ebc98524..2955e4318 100644 --- a/lib/common/utils.ts +++ b/lib/common/utils.ts @@ -459,7 +459,8 @@ export function generateUnPatchAndRePatch(patches: [{target: any, methods: strin unPatchFn: () => { patches.forEach(patch => { patch.methods.forEach(m => { - const originalDelegate = patch.target[zoneSymbol(m)]; + const method = patch.target[m]; + const originalDelegate = method && (method as any)[zoneSymbol('OriginalDelegate')]; if (originalDelegate) { patch.target[m] = originalDelegate; }