fix: Fix watchQuery on reused page component

This commit is contained in:
Sébastien Chopin 2018-02-28 16:40:59 +01:00
parent f55c648fed
commit 8903db1c27
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ function fixPrepatch(to, ___) {
instances.forEach((instance, i) => { instances.forEach((instance, i) => {
if (!instance) return if (!instance) return
if (to.matched[matches[i]].path.indexOf(':') === -1) return // If not a dyanmic route, skip if (!this._queryChanged && to.matched[matches[i]].path.indexOf(':') === -1 && to.matched[matches[i]].path.indexOf('*') === -1) return // If not a dynamic route, skip
if (instance.constructor._dataRefresh && _lastPaths[i] === instance.constructor._path && typeof instance.constructor.options.data === 'function') { if (instance.constructor._dataRefresh && _lastPaths[i] === instance.constructor._path && typeof instance.constructor.options.data === 'function') {
const newData = instance.constructor.options.data.call(instance) const newData = instance.constructor.options.data.call(instance)
for (let key in newData) { for (let key in newData) {