8
0
Просмотр исходного кода

Remove Array.isArray() check for configuration option.

An early Exception will tell developer that the config provided is wrong.
Maciej Gołaszewski 5 лет назад
Родитель
Сommit
b8c5703d49
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/ckeditor5-engine/src/conversion/downcasthelpers.js

+ 2 - 2
packages/ckeditor5-engine/src/conversion/downcasthelpers.js

@@ -1368,13 +1368,13 @@ function downcastElementToElement( config ) {
 		dispatcher.on( 'insert:' + config.model, insertElement( config.view ), { priority: config.converterPriority || 'normal' } );
 
 		if ( config.triggerBy ) {
-			if ( Array.isArray( config.triggerBy.attributes ) ) {
+			if ( config.triggerBy.attributes ) {
 				for ( const attributeKey of config.triggerBy.attributes ) {
 					dispatcher._mapReconversionTriggerEvent( config.model, `attribute:${ attributeKey }:${ config.model }` );
 				}
 			}
 
-			if ( Array.isArray( config.triggerBy.children ) ) {
+			if ( config.triggerBy.children ) {
 				for ( const childName of config.triggerBy.children ) {
 					dispatcher._mapReconversionTriggerEvent( config.model, `insert:${ childName }` );
 					dispatcher._mapReconversionTriggerEvent( config.model, `remove:${ childName }` );