Fix ApplyBehaviorsOnSiblings type and performance
This commit is contained in:
parent
191fa9cfa2
commit
5fdee602f1
1 changed files with 8 additions and 3 deletions
|
@ -42,12 +42,17 @@ export function ApplyBehaviors(container: IContainerModel, symbols: Map<string,
|
|||
* @param symbols
|
||||
* @returns
|
||||
*/
|
||||
export function ApplyBehaviorsOnSiblings(newContainer: ContainerModel, symbols: Map<string, ISymbolModel>): void {
|
||||
export function ApplyBehaviorsOnSiblings(newContainer: IContainerModel, symbols: Map<string, ISymbolModel>): void {
|
||||
if (newContainer.parent === null || newContainer.parent === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
newContainer.parent.children
|
||||
.filter(container => newContainer !== container)
|
||||
.forEach(container => ApplyBehaviors(container, symbols));
|
||||
.forEach((container: IContainerModel) => {
|
||||
if (container === newContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyBehaviors(container, symbols);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue