fix: trigger watch query on trailing slash change (#3695)

This commit is contained in:
Alexander Lichter 2018-08-15 15:24:28 +02:00 committed by Sébastien Chopin
parent e6e8adb671
commit f9637a1c86

View File

@ -314,7 +314,7 @@ async function render (to, from, next) {
Component._dataRefresh = false
// Check if Component need to be refreshed (call asyncData & fetch)
// Only if its slug has changed or is watch query changes
if (this._pathChanged && Component._path !== _lastPaths[i]) {
if (this._pathChanged && this._queryChanged || Component._path !== _lastPaths[i]) {
Component._dataRefresh = true
} else if (!this._pathChanged && this._queryChanged) {
const watchQuery = Component.options.watchQuery