瀏覽代碼

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

Aleksander Nowodzinski 6 年之前
父節點
當前提交
2622511685
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 );