diff --git a/platform/commonUI/general/src/directives/MCTResize.js b/platform/commonUI/general/src/directives/MCTResize.js index d16384620d..130f0ce9e2 100644 --- a/platform/commonUI/general/src/directives/MCTResize.js +++ b/platform/commonUI/general/src/directives/MCTResize.js @@ -83,13 +83,14 @@ define( // Callback to fire after each timeout; // update bounds and schedule another timeout function onInterval() { + if (!active) { + return; + } fireEval({ width: element[0].offsetWidth, height: element[0].offsetHeight }); - if (active) { - $timeout(onInterval, currentInterval(), false); - } + $timeout(onInterval, currentInterval(), false); } // Stop running in the background