mirror of
https://github.com/nasa/openmct.git
synced 2025-04-09 04:14:32 +00:00
[Resize] don't trigger callback when destroyed
Prevent MCTResize from triggering a callback after it is destroyed. Fixes https://github.com/nasa/openmct/issues/1509
This commit is contained in:
parent
34ef98e0cd
commit
d82230dea4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user