8
0
Просмотр исходного кода

Internal: Minor code simplification for the last PR.

Piotrek Koszuliński 6 лет назад
Родитель
Сommit
b24f55d096
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/ckeditor5-utils/src/dom/createelement.js

+ 1 - 1
packages/ckeditor5-utils/src/dom/createelement.js

@@ -26,7 +26,7 @@ import { isString } from 'lodash-es';
  * @returns {Element} Created element.
  */
 export default function createElement( doc, name, attributes = {}, children = [] ) {
-	const namespace = attributes instanceof Object ? attributes.xmlns : null;
+	const namespace = attributes && attributes.xmlns;
 	const element = namespace ? doc.createElementNS( namespace, name ) : doc.createElement( name );
 
 	for ( const key in attributes ) {