Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Internal: Minor code simplification for the last PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Oct 8, 2019
1 parent 37fbcb9 commit b934722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom/createelement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit b934722

Please sign in to comment.