Browse Source

fix lint

dev
Evan You 8 years ago
parent
commit
1c4ca4bc08
  1. 8
      src/core/vdom/patch.js
  2. 2
      test/unit/modules/vdom/patch/hydration.spec.js

8
src/core/vdom/patch.js

@ -82,7 +82,7 @@ export function createPatchFunction (backend) {
}
function createElm (vnode, insertedVnodeQueue, nested) {
let i, elm
let i
const data = vnode.data
vnode.isRootInsert = !nested
if (isDef(data)) {
@ -113,7 +113,7 @@ export function createPatchFunction (backend) {
)
}
}
elm = vnode.elm = vnode.ns
vnode.elm = vnode.ns
? nodeOps.createElementNS(vnode.ns, tag)
: nodeOps.createElement(tag)
setScope(vnode)
@ -122,9 +122,9 @@ export function createPatchFunction (backend) {
invokeCreateHooks(vnode, insertedVnodeQueue)
}
} else if (vnode.isComment) {
elm = vnode.elm = nodeOps.createComment(vnode.text)
vnode.elm = nodeOps.createComment(vnode.text)
} else {
elm = vnode.elm = nodeOps.createTextNode(vnode.text)
vnode.elm = nodeOps.createTextNode(vnode.text)
}
return vnode.elm
}

2
test/unit/modules/vdom/patch/hydration.spec.js

@ -131,7 +131,7 @@ describe('vdom patch: hydration', () => {
dom.setAttribute('server-rendered', 'true')
dom.innerHTML = '<div><span>foo</span></div>'
const vm = new Vue({
new Vue({
template: '<div><test></test></div>',
components: {
test: {

Loading…
Cancel
Save