Explorar el Código

Fix for 'TypeError: Object doesn't support property or method Symbol.iterator' on Edge.

Krzysztof Krztoń hace 7 años
padre
commit
7f8ce9e17a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/ckeditor5-paste-from-office/src/filters/utils.js

+ 1 - 1
packages/ckeditor5-paste-from-office/src/filters/utils.js

@@ -73,7 +73,7 @@ function documentToView( htmlDocument ) {
 function extractStyles( htmlDocument ) {
 	const styles = [];
 	const stylesString = [];
-	const styleTags = htmlDocument.getElementsByTagName( 'style' );
+	const styleTags = Array.from( htmlDocument.getElementsByTagName( 'style' ) );
 
 	for ( const style of styleTags ) {
 		if ( style.sheet && style.sheet.cssRules && style.sheet.cssRules.length ) {