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

Commit

Permalink
Simplify check for xmlns attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Oct 8, 2019
1 parent 5921556 commit ec7a9bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/view/domconverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ export default class DomConverter {
return domElement;
} else {
// Create DOM element.
const namespace = viewNode.getAttribute( 'xmlns' );
if ( namespace !== undefined ) {
domElement = domDocument.createElementNS( namespace, viewNode.name );
if ( viewNode.hasAttribute( 'xmlns' ) ) {
domElement = domDocument.createElementNS( viewNode.getAttribute( 'xmlns' ), viewNode.name );
} else {
domElement = domDocument.createElement( viewNode.name );
}
Expand Down

0 comments on commit ec7a9bb

Please sign in to comment.