diff --git a/awx/ui/static/js/directives/host-count-graph.js b/awx/ui/static/js/directives/host-count-graph.js index bffb5f8c76..81675e780f 100644 --- a/awx/ui/static/js/directives/host-count-graph.js +++ b/awx/ui/static/js/directives/host-count-graph.js @@ -28,14 +28,7 @@ angular.module('DashboardGraphs'). adjustGraphSize(license_graph, element); } - angular.element($window).on('resize', function() { - - if(!license_graph) { - return; - } - - adjustGraphSize(license_graph, element); - }); + angular.element($window).on('resize', onResize); element.on('$destroy', function() { angular.element($window).off('resize', onResize);