diff --git a/src/view/domconverter.js b/src/view/domconverter.js index cc1eb92ba..f0723a718 100644 --- a/src/view/domconverter.js +++ b/src/view/domconverter.js @@ -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 ); }