Skip to content

Commit

Permalink
Hijack child elements only from NGDynamicGroup, not every subclass!
Browse files Browse the repository at this point in the history
  • Loading branch information
hugithordarson committed Oct 12, 2024
1 parent 911b289 commit d0a8ae0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ private static List<NGElement> childrenFromTemplate( final NGElement contentTemp
}

// If the contained template is another DynamicGroup, "unwrap it", i.e. just steal it's kids.
if( contentTemplate instanceof NGDynamicGroup dg ) {
return dg.children();
if( contentTemplate.getClass().equals( NGDynamicGroup.class ) ) {
return ((NGDynamicGroup)contentTemplate).children();
}

// If template is any other element, it's an only child.
Expand Down

0 comments on commit d0a8ae0

Please sign in to comment.