Wrap all controller setup code with Client.onReady()
This ensures we don't rely on timing for execution against a non ready Client instance
This commit is contained in:
@@ -471,13 +471,15 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
|
||||
});
|
||||
}
|
||||
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return console.error(error);
|
||||
Client.onReady(function () {
|
||||
Client.refreshUserInfo(function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if ($scope.user.admin) {
|
||||
fetchUsers();
|
||||
fetchGroups();
|
||||
}
|
||||
if ($scope.user.admin) {
|
||||
fetchUsers();
|
||||
fetchGroups();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// setup all the dialog focus handling
|
||||
|
||||
Reference in New Issue
Block a user