Explorar el Código

Remove unecessary if. There always should be at least one active normalizer.

Mateusz Samsel hace 6 años
padre
commit
f8df8f5688
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      packages/ckeditor5-paste-from-office/src/pastefromoffice.js

+ 2 - 4
packages/ckeditor5-paste-from-office/src/pastefromoffice.js

@@ -67,11 +67,9 @@ export default class PasteFromOffice extends Plugin {
 				const htmlString = data.dataTransfer.getData( 'text/html' );
 				const activeNormalizer = normalizers.find( normalizer => normalizer.isActive( htmlString ) );
 
-				if ( activeNormalizer ) {
-					activeNormalizer.execute( data );
+				activeNormalizer.execute( data );
 
-					data.isTransformedWithPasteFromOffice = true;
-				}
+				data.isTransformedWithPasteFromOffice = true;
 			},
 			{ priority: 'high' }
 		);