mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Check for component options data
This commit is contained in:
parent
8ab7d4f0df
commit
42dc15e72e
@ -147,7 +147,7 @@ function fixPrepatch (to, ___) {
|
||||
let instances = getMatchedComponentsInstances(to)
|
||||
_lastComponentsFiles = instances.map((instance, i) => {
|
||||
if (!instance) return '';
|
||||
if (_lastPaths[i] === instance.constructor._path) {
|
||||
if (_lastPaths[i] === instance.constructor._path && typeof instance.constructor.options.data === 'function') {
|
||||
let newData = instance.constructor.options.data()
|
||||
for (let key in newData) {
|
||||
Vue.set(instance.$data, key, newData[key])
|
||||
|
Loading…
Reference in New Issue
Block a user