Skip to content

Commit

Permalink
refactor: tiny cleanup changes (#9193)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo authored and yyx990803 committed Dec 12, 2018
1 parent af9e2b3 commit 38e967b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
18 changes: 8 additions & 10 deletions src/core/instance/events.js
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/util/debug.js
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/server/template-renderer/index.js
Expand Up @@ -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('')
Expand Down

0 comments on commit 38e967b

Please sign in to comment.