From f03d9fa0f86d4d5c904bf39323b7d58851f7c721 Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Fri, 29 Mar 2019 21:19:39 +0900 Subject: [PATCH] element: fix #1209, check customElements is null or not --- lib/browser/custom-elements.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser/custom-elements.ts b/lib/browser/custom-elements.ts index dc8fea845..02eb35a57 100644 --- a/lib/browser/custom-elements.ts +++ b/lib/browser/custom-elements.ts @@ -8,7 +8,7 @@ export function patchCustomElements(_global: any, api: _ZonePrivate) { const {isBrowser, isMix} = api.getGlobalObjects()!; - if ((!isBrowser && !isMix) || !('customElements' in _global)) { + if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) { return; }