Explorar o código

fix(runtime): use key variable for svg innerHTML

Close #11787
Eduardo San Martin Morote %!s(int64=5) %!d(string=hai) anos
pai
achega
82e4593a6d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/platforms/web/runtime/modules/dom-props.js

+ 1 - 1
src/platforms/web/runtime/modules/dom-props.js

@@ -51,7 +51,7 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) {
     } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
       // IE doesn't support innerHTML for SVG elements
       svgContainer = svgContainer || document.createElement('div')
-      svgContainer.innerHTML = `<svg>${cur}</svg>`
+      svgContainer[key] = `<svg>${cur}</svg>`
       const svg = svgContainer.firstChild
       while (elm.firstChild) {
         elm.removeChild(elm.firstChild)