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

Commit

Permalink
fix unpatch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion committed Apr 30, 2018
1 parent 8119564 commit 269b896
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 269b896

Please sign in to comment.