diff --git a/src/core/instance/state.js b/src/core/instance/state.js index b1549b0dcc4..eb8ec4b71b8 100644 --- a/src/core/instance/state.js +++ b/src/core/instance/state.js @@ -111,9 +111,8 @@ function initProps (vm: Component, propsOptions: Object) { function initData (vm: Component) { let data = vm.$options.data - data = vm._data = typeof data === 'function' - ? getData(data, vm) - : data || {} + // $options.data is guaranteed to be a function after merge + data = vm._data = getData(data, vm) if (!isPlainObject(data)) { data = {} process.env.NODE_ENV !== 'production' && warn(