From d39af8d0159025e1e81c396c3dbbedc760d93388 Mon Sep 17 00:00:00 2001 From: Till Breuer Date: Tue, 18 Mar 2014 17:47:59 +0100 Subject: [PATCH] Don't request columns sums when columns are removed --- .../work_packages/work-package-total-sums-directive.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/angular/directives/work_packages/work-package-total-sums-directive.js b/app/assets/javascripts/angular/directives/work_packages/work-package-total-sums-directive.js index ea1c253a2b..9431004bab 100644 --- a/app/assets/javascripts/angular/directives/work_packages/work-package-total-sums-directive.js +++ b/app/assets/javascripts/angular/directives/work_packages/work-package-total-sums-directive.js @@ -15,9 +15,9 @@ angular.module('openproject.workPackages.directives') }); } - scope.$watch('columns.length', function() { + scope.$watch('columns.length', function(length, formerLength) { // map columns to sums if the column data is a number - fetchSums(); + if(length >= formerLength) fetchSums(); }); } };