mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
deregister the transition hook when destroy smart-search controller
This commit is contained in:
parent
e8748fa147
commit
a07ee67eb9
@ -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…
x
Reference in New Issue
Block a user