Permalink
Browse files

refactor: tiny cleanup changes (#9193)

  • Loading branch information...
clarkdo authored and yyx990803 committed Dec 12, 2018
1 parent af9e2b3 commit 38e967b8067441ff37cb3b923200023a6b842759
Showing with 10 additions and 12 deletions.
  1. +8 −10 src/core/instance/events.js
  2. +1 −1 src/core/util/debug.js
  3. +1 −1 src/server/template-renderer/index.js
@@ -102,16 +102,14 @@ export function eventsMixin (Vue: Class<Component>) {
vm._events[event] = null
return vm
}
if (fn) {
// specific handler
let cb
let i = cbs.length
while (i--) {
cb = cbs[i]
if (cb === fn || cb.fn === fn) {
cbs.splice(i, 1)
break
}
// specific handler
let cb
let i = cbs.length
while (i--) {
cb = cbs[i]
if (cb === fn || cb.fn === fn) {
cbs.splice(i, 1)
break
}
}
return vm
@@ -41,7 +41,7 @@ if (process.env.NODE_ENV !== 'production') {
? vm.options
: vm._isVue
? vm.$options || vm.constructor.options
: vm || {}
: vm
let name = options.name || options._componentTag
const file = options.__file
if (!name && file) {
@@ -207,7 +207,7 @@ export default class TemplateRenderer {
if (this.clientManifest) {
const initial = this.preloadFiles.filter(({ file }) => isJS(file))
const async = (this.getUsedAsyncFiles(context) || []).filter(({ file }) => isJS(file))
const needed = [initial[0]].concat(async || [], initial.slice(1))
const needed = [initial[0]].concat(async, initial.slice(1))
return needed.map(({ file }) => {
return `<script src="${this.publicPath}${file}" defer></script>`
}).join('')

0 comments on commit 38e967b

Please sign in to comment.