diff --git a/src/component.js b/src/component.js index a215592f87..b56c1bcb30 100644 --- a/src/component.js +++ b/src/component.js @@ -136,11 +136,12 @@ function renderComponent(component) { newVNode, oldVNode, component._globalContext, - component._parentDom.namespaceURI == 'http://www.w3.org/1999/xhtml' - ? 1 - : component._parentDom.namespaceURI == 'http://www.w3.org/2000/svg' + component._parentDom.namespaceURI == 'http://www.w3.org/2000/svg' ? 2 - : 3, + : component._parentDom.namespaceURI == + 'http://www.w3.org/1998/Math/MathML' + ? 3 + : 1, oldVNode._flags & MODE_HYDRATE ? [oldDom] : null, commitQueue, oldDom == null ? getDomSibling(oldVNode) : oldDom, diff --git a/src/render.js b/src/render.js index dccc97f226..2861befbee 100644 --- a/src/render.js +++ b/src/render.js @@ -41,11 +41,11 @@ export function render(vnode, parentDom, replaceNode) { vnode, oldVNode || EMPTY_OBJ, EMPTY_OBJ, - parentDom.namespaceURI == 'http://www.w3.org/1999/xhtml' - ? 1 - : parentDom.namespaceURI == 'http://www.w3.org/2000/svg' + parentDom.namespaceURI == 'http://www.w3.org/2000/svg' ? 2 - : 3, + : parentDom.namespaceURI == 'http://www.w3.org/1998/Math/MathML' + ? 3 + : 1, !isHydrating && replaceNode ? [replaceNode] : oldVNode