From 1c4ca4bc08b0faf1b457aa02d8a96749e232fb16 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 8 Sep 2016 13:17:30 +0200 Subject: [PATCH] fix lint --- src/core/vdom/patch.js | 8 ++++---- test/unit/modules/vdom/patch/hydration.spec.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/vdom/patch.js b/src/core/vdom/patch.js index 455698a6..f7baa787 100644 --- a/src/core/vdom/patch.js +++ b/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 } diff --git a/test/unit/modules/vdom/patch/hydration.spec.js b/test/unit/modules/vdom/patch/hydration.spec.js index f028a990..b69a477a 100644 --- a/test/unit/modules/vdom/patch/hydration.spec.js +++ b/test/unit/modules/vdom/patch/hydration.spec.js @@ -131,7 +131,7 @@ describe('vdom patch: hydration', () => { dom.setAttribute('server-rendered', 'true') dom.innerHTML = '
foo
' - const vm = new Vue({ + new Vue({ template: '
', components: { test: {