Skip to content

Commit e3bb36f

Browse files
committed
trigger digest with $timeout in instance layout controller
1 parent 39f1812 commit e3bb36f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

client/controllers/abstractLayouts/controllerInstanceLayout.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function ControllerInstanceLayout(
1010
$stateParams,
1111
errs,
1212
$rootScope,
13+
$timeout,
1314
keypather,
1415
async,
1516
$scope
@@ -36,7 +37,8 @@ function ControllerInstanceLayout(
3637
function (cb) {
3738
$rootScope.dataApp.state.loadingInstances = true;
3839
$rootScope.dataApp.data.instances = null;
39-
cb();
40+
// Using $timeout to trigger digest
41+
$timeout(cb);
4042
},
4143
function (cb) {
4244
fetchInstances(username, true, cb);
@@ -45,7 +47,7 @@ function ControllerInstanceLayout(
4547
if (username === keypather.get($rootScope, 'dataApp.data.activeAccount.oauthName()')) {
4648
$rootScope.dataApp.data.instances = instances;
4749
$rootScope.dataApp.state.loadingInstances = false;
48-
cb();
50+
$timeout(cb);
4951
} else {
5052
cb();
5153
}

0 commit comments

Comments
 (0)