From fd069db3b9f272d201bf0b75300793bc4a7c8152 Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Wed, 23 Jan 2019 03:46:04 +0900 Subject: [PATCH] fix for tests in angular repo (#1179) --- lib/browser/register-element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser/register-element.ts b/lib/browser/register-element.ts index f590f0c60..23fd30d4e 100644 --- a/lib/browser/register-element.ts +++ b/lib/browser/register-element.ts @@ -26,7 +26,7 @@ function patchCallbacks(target: any, targetName: string, method: string, callbac if (descriptor && descriptor.value) { descriptor.value = wrapWithCurrentZone(descriptor.value, source); _redefineProperty(opts.prototype, callback, descriptor); - } else { + } else if (prototype[callback]) { prototype[callback] = wrapWithCurrentZone(prototype[callback], source); } } else if (prototype[callback]) {