Avoid polling iframe when url is not set

This commit is contained in:
Kristóf Tóth 2019-10-14 14:58:40 +02:00
parent f51aebe1de
commit 52e80dff03

View File

@ -168,6 +168,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
errors.pipe( errors.pipe(
tap( tap(
response => { response => {
if (this.iframeUrl.value === '') {
this.iframeReloadSubscription.unsubscribe();
this.polling.next(false);
}
if (response.status === 200) { if (response.status === 200) {
this.iframeReloadSubscription.unsubscribe(); this.iframeReloadSubscription.unsubscribe();
this.polling.next(false); this.polling.next(false);