0👍
You are trying to replace the query with itself
const old_query = useRoute().query;
const query = old_query;
delete query.postID;
replace({ query })
function replace({query}) {
if (query === old_query) // true as you pass the same object you took from it
throw new Error('Avoided redundant navigation to current location')
}
Use
// clone while dropping postID
const {postID, ...query} = useRoute().query;
useRouter().replace({ query })
- [Vuejs]-Vuetify fixed table headers only work for last header row ( previous ones are hidden on scroll )
- [Vuejs]-Confirm my understanding of how to iteratively render multiple custom Tree components in Vue.js 3?
Source:stackexchange.com