mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-25 02:03:37 -05:00
deregister the transition hook when destroy smart-search controller
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user