From 9dc4fa18775902e6510e57dc5d69ee6c4e484328 Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Mon, 22 May 2017 22:39:01 +0900 Subject: [PATCH] fix(patch): fix #791, fix mediaQuery/Notification patch use wrong global --- lib/browser/webapis-media-query.ts | 2 +- lib/browser/webapis-notification.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/browser/webapis-media-query.ts b/lib/browser/webapis-media-query.ts index dbe709f71..6172239d3 100644 --- a/lib/browser/webapis-media-query.ts +++ b/lib/browser/webapis-media-query.ts @@ -10,7 +10,7 @@ Zone.__load_patch('mediaQuery', (global: any, Zone: ZoneType, api: _ZonePrivate) return; } api.patchEventTargetMethods( - _global['MediaQueryList'].prototype, 'addListener', 'removeListener', + global['MediaQueryList'].prototype, 'addListener', 'removeListener', (self: any, args: any[]) => { return { useCapturing: false, diff --git a/lib/browser/webapis-notification.ts b/lib/browser/webapis-notification.ts index 42ffd0e67..1bccaa9c9 100644 --- a/lib/browser/webapis-notification.ts +++ b/lib/browser/webapis-notification.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ Zone.__load_patch('notification', (global: any, Zone: ZoneType, api: _ZonePrivate) => { - const Notification = _global['Notification']; + const Notification = global['Notification']; if (!Notification || !Notification.prototype) { return; }