瀏覽代碼

Fix: View#attachDomRoot should not throw because NamedNodeMap is not iterable in MS Edge.

Aleksander Nowodzinski 7 年之前
父節點
當前提交
cf16be5ee4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/ckeditor5-engine/src/view/view.js

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

@@ -222,7 +222,7 @@ export default class View {
 		//    The editing view takes over the attribute management completely because various
 		//    features (e.g. addPlaceholder()) require dynamic changes of those attributes and they
 		//    cannot be managed by the engine and the UI library at the same time.
-		for ( const { name, value } of domRoot.attributes ) {
+		for ( const { name, value } of Array.from( domRoot.attributes ) ) {
 			initialDomRootAttributes[ name ] = value;
 
 			// Do not use writer.setAttribute() for the class attribute. The EditableUIView class