Skip to content
Snippets Groups Projects
Commit d15f3030 authored by Manikanth Dindigala's avatar Manikanth Dindigala
Browse files

fix: update route path condition.

parent ee1d451d
No related branches found
No related tags found
1 merge request!55fix/#105: navigating from tido homepage to website
Pipeline #218646 passed
......@@ -93,7 +93,9 @@ export default {
}),
computed: {
getPath(){
return window?.location?.origin + window?.location?.pathname;
// we need this condition check because of computed reactive property.
// this.$route.path changes everytime we navigate between pages, so get path will always get's updated.
return window?.location?.origin + (window?.location?.pathname !== this.$route.path ? window?.location?.pathname : this.$route.path);
}
}
}
......
......@@ -48,7 +48,9 @@ export default {
}),
computed: {
getPath(){
return window?.location?.origin + window?.location?.pathname;
// we need this condition check because of computed reactive property.
// this.$route.path changes everytime we navigate between pages, so get path will always get's updated.
return window?.location?.origin + (window?.location?.pathname !== this.$route.path ? window?.location?.pathname : this.$route.path);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment