This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1212import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror' ;
1313import mix from '@ckeditor/ckeditor5-utils/src/mix' ;
1414import EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin' ;
15- import Collection from '@ckeditor/ckeditor5-utils/src/collection' ;
1615import View from './view' ;
1716import ViewCollection from './viewcollection' ;
1817import cloneDeepWith from '@ckeditor/ckeditor5-utils/src/lib/lodash/cloneDeepWith' ;
@@ -1081,7 +1080,7 @@ function normalize( def ) {
10811080 normalizeAttributes ( def . attributes ) ;
10821081 }
10831082
1084- const children = new Collection ( ) ;
1083+ const children = new ViewCollection ( ) ;
10851084
10861085 if ( def . children ) {
10871086 if ( isViewCollection ( def . children ) ) {
Original file line number Diff line number Diff line change @@ -570,6 +570,24 @@ describe( 'Template', () => {
570570 '<p><a></a><b></b><i>foo</i></p>'
571571 ) ;
572572 } ) ;
573+
574+ // https://github.com/ckeditor/ckeditor5-ui/issues/289
575+ it ( 'does not throw when child does not have an "id" property' , ( ) => {
576+ const strongView = getView ( {
577+ tag : 'strong'
578+ } ) ;
579+
580+ strongView . set ( 'id' ) ;
581+
582+ expect ( ( ) => {
583+ getView ( {
584+ tag : 'div' ,
585+ children : [
586+ strongView
587+ ]
588+ } ) ;
589+ } ) . to . not . throw ( ) ;
590+ } ) ;
573591 } ) ;
574592
575593 describe ( 'bindings' , ( ) => {
You can’t perform that action at this time.
0 commit comments