Skip to content

Commit f90d839

Browse files
authored
Merge pull request #4246 from JanzenJohn/develop
Remove infinite requests loop
2 parents be5278f + f537619 commit f90d839

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/js/app/dashboard/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ module.exports = Mn.View.extend({
5050
onRender: function () {
5151
let view = this;
5252

53-
Api.Reports.getHostStats()
53+
if (typeof view.stats.hosts === 'undefined') {
54+
Api.Reports.getHostStats()
5455
.then(response => {
5556
if (!view.isDestroyed()) {
5657
view.stats.hosts = response;
@@ -60,6 +61,7 @@ module.exports = Mn.View.extend({
6061
.catch(err => {
6162
console.log(err);
6263
});
64+
}
6365
},
6466

6567
/**

0 commit comments

Comments
 (0)