mirror of
https://github.com/nasa/openmct.git
synced 2025-01-21 03:55:31 +00:00
[Common UI] Avoid infinite digest
Avoid infinite digest when first applicy mct-scroll directives, WTD-920.
This commit is contained in:
parent
5df2710721
commit
86ee28740f
@ -39,7 +39,7 @@ define(
|
||||
}
|
||||
|
||||
// Initialize state in scope
|
||||
updateScope();
|
||||
parsed.assign(scope, element[0][property]);
|
||||
|
||||
// Update element state when value in scope changes
|
||||
scope.$watch(expr, updateElement);
|
||||
|
@ -86,6 +86,11 @@ define(
|
||||
expect(mockScope.$apply).toHaveBeenCalledWith(EXPRESSION);
|
||||
});
|
||||
|
||||
// This would trigger an infinite digest exception
|
||||
it("does not call $apply during construction", function () {
|
||||
expect(mockScope.$apply).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue
Block a user