Kaynağa Gözat

Fix: View#detachDomRoot should not throw because NamedNodeMap is not iterable in MS Edge (see ckeditor/ckeditor5#479).

Aleksander Nowodzinski 6 yıl önce
ebeveyn
işleme
2622511685
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      packages/ckeditor5-engine/src/view/view.js

+ 1 - 1
packages/ckeditor5-engine/src/view/view.js

@@ -275,7 +275,7 @@ export default class View {
 		const domRoot = this.domRoots.get( name );
 
 		// Remove all root attributes so the DOM element is "bare".
-		[ ...domRoot.attributes ].forEach( ( { name } ) => domRoot.removeAttribute( name ) );
+		Array.from( domRoot.attributes ).forEach( ( { name } ) => domRoot.removeAttribute( name ) );
 
 		const initialDomRootAttributes = this._initialDomRootAttributes.get( domRoot );