@@ -815,7 +815,7 @@ function arrayValueReducer( prev, cur ) {
function extendObjectValueArray( obj, ext ) {
for ( let a in ext ) {
if ( obj[ a ] ) {
- obj[ a ].push( ...ext[ a ] || [] );
+ obj[ a ].push( ...ext[ a ] );
} else {
obj[ a ] = ext[ a ];
}
@@ -1540,6 +1540,25 @@ describe( 'Template', () => {
);
} );
+ it( 'appends new - no children', () => {
+ extensionTest(
+ {
+ tag: 'p'
+ },
+ children: [
+ tag: 'span',
+ attributes: {
+ class: 'bar'
+ }
+ ]
+ '<p><span class="bar"></span></p>'
+ );
+ } );
+
it( 'appends new - element', () => {
extensionTest(
{