diff --git a/src/core/instance/events.js b/src/core/instance/events.js index 8225bdecb8..bb07a96b42 100644 --- a/src/core/instance/events.js +++ b/src/core/instance/events.js @@ -102,16 +102,14 @@ export function eventsMixin (Vue: Class) { 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 diff --git a/src/core/util/debug.js b/src/core/util/debug.js index 6b7315f4b2..4aef7b53d4 100644 --- a/src/core/util/debug.js +++ b/src/core/util/debug.js @@ -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) { diff --git a/src/server/template-renderer/index.js b/src/server/template-renderer/index.js index 05ce8c49cf..65887c2591 100644 --- a/src/server/template-renderer/index.js +++ b/src/server/template-renderer/index.js @@ -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 `` }).join('')