Browse Source

Internal: Minor code simplification for the last PR.

Piotrek Koszuliński 6 years ago
parent
commit
b24f55d096
1 changed files with 1 additions and 1 deletions
  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 ) {