fix(ssr): fix window references

This commit is contained in:
Adam Bradley
2019-02-23 16:54:09 -06:00
parent e3e8c85087
commit 5b1bdc37e0
7 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ export class Geofence extends IonicNativePlugin {
*/
onNotificationClicked(): Observable<any> {
return new Observable<any>(observer => {
window &&
typeof window !== 'undefined' &&
window.geofence &&
(window.geofence.onNotificationClicked = observer.next.bind(observer));
return () => (window.geofence.onNotificationClicked = () => {});