Skip to content

Commit

Permalink
Merge branch 'master' into users/t-abaskar/yaml-validator-customexcep…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
abaskk-msft authored Jul 29, 2024
2 parents bfb647d + 5f489c0 commit bbcce65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Persistence.Tests/Yaml/DeserializerValidTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,9 @@ public void Deserialize_Should_AddGalleryTemplate(string path, bool isControlIde
gallery.Children.Should().HaveCount(2);
gallery.Properties.Should().NotBeNull().And.HaveCount(2);
gallery.Properties.Should().NotContainKeys("TemplateFill", "OnSelect");
var galleryTemplate = gallery.Children.FirstOrDefault(c => c.Template.Name == "GalleryTemplate");
var galleryTemplate = gallery.Children.ElementAt(0);
galleryTemplate.ShouldNotBeNull();
galleryTemplate.Template.Name.Should().Be("GalleryTemplate");
galleryTemplate.Properties.Should().NotBeNull().And.HaveCount(1);
galleryTemplate.Properties.Should().ContainKeys("TemplateFill");
}
Expand Down
5 changes: 2 additions & 3 deletions src/Persistence/Yaml/ControlFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ public static T AfterDeserialize<T>(this T control, IControlFactory controlFacto
var isGroupContainer = control.Template.Name == BuiltInTemplates.GroupContainer.Name;
var originalChildCount = control.Children.Count;

var children = control.Children
.Select(addZIndex)
.Concat(childrenToAdd)
var children = childrenToAdd
.Concat(control.Children.Select(addZIndex))
.ToList();

var properties = propertiesToRemove.Count > 0
Expand Down

0 comments on commit bbcce65

Please sign in to comment.