fix(playlist): fix for memory leak when running playlist for a long period, fixes #3794

This commit is contained in:
Torkel Ödegaard
2016-01-20 10:39:58 +01:00
parent fb82425d3e
commit 4f7f03a28c
3 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
///<reference path="../../headers/common.d.ts" />
import angular from 'angular';
import config from 'app/core/config';
import coreModule from '../../core/core_module';
import kbn from 'app/core/utils/kbn';
@@ -20,10 +21,9 @@ class PlaylistSrv {
var playedAllDashboards = this.index > this.dashboards.length - 1;
if (playedAllDashboards) {
this.start(this.playlistId);
window.location.href = `${config.appSubUrl}/playlists/play/${this.playlistId}`;
} else {
var dash = this.dashboards[this.index];
this.$location.url('dashboard/' + dash.uri);
this.index++;