Skip to content

Commit be60430

Browse files
Jefiozieuser378230
authored andcommitted
fix(uiSelectCtrl): Reset refreshing flag even if async request errors
Previously the `ctrl.refreshing` flag may not have been reset to `false` if the async request for data failed. Closes angular-ui#1833
1 parent f25af8f commit be60430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uiSelectController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ uis.controller('uiSelectCtrl',
305305
var refreshPromise = $scope.$eval(refreshAttr);
306306
if (refreshPromise && angular.isFunction(refreshPromise.then) && !ctrl.refreshing) {
307307
ctrl.refreshing = true;
308-
refreshPromise.then(function() {
308+
refreshPromise.finally(function() {
309309
ctrl.refreshing = false;
310310
});
311311
}}, ctrl.refreshDelay);

0 commit comments

Comments
 (0)