From 5a7394cb33288c1aa3667695149da31b7683b193 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 11 Apr 2018 11:18:58 -0400 Subject: [PATCH] only override show if not false --- src/popup/components/pop-out.component.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/popup/components/pop-out.component.ts b/src/popup/components/pop-out.component.ts index 8f62c819d2..3c32e46539 100644 --- a/src/popup/components/pop-out.component.ts +++ b/src/popup/components/pop-out.component.ts @@ -1,6 +1,7 @@ import { Component, Input, + OnInit, } from '@angular/core'; import { Angulartics2 } from 'angulartics2'; @@ -15,12 +16,16 @@ import { PopupUtilsService } from '../services/popup-utils.service'; selector: 'app-pop-out', templateUrl: 'pop-out.component.html', }) -export class PopOutComponent { +export class PopOutComponent implements OnInit { @Input() show = true; constructor(private analytics: Angulartics2, private platformUtilsService: PlatformUtilsService, - private popupUtilsService: PopupUtilsService) { - this.show = !this.platformUtilsService.isSafari(); + private popupUtilsService: PopupUtilsService) {} + + ngOnInit() { + if (this.show) { + this.show = !this.platformUtilsService.isSafari(); + } } expand() {