mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Merge pull request #2355 from Haokun-Chen/2197
deregister the transition hook when destroy smart-search controller
This commit is contained in:
commit
d17f3d7d2a
@ -152,8 +152,11 @@ function SmartSearchController (
|
||||
$scope.$emit(optionsKey, data.options);
|
||||
}
|
||||
});
|
||||
|
||||
$scope.$on('$destroy', transitionSuccessListener);
|
||||
$scope.$on('$destroy', () => {
|
||||
if (transitionSuccessListener) {
|
||||
transitionSuccessListener();
|
||||
}
|
||||
});
|
||||
$scope.$watch('disableSearch', disableSearch => {
|
||||
if (disableSearch) {
|
||||
$scope.searchPlaceholder = i18n._('Cannot search running job');
|
||||
|
Loading…
Reference in New Issue
Block a user