summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/components/repo_tabs.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/components/repo_tabs.vue')
-rw-r--r--app/assets/javascripts/ide/components/repo_tabs.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/repo_tabs.vue b/app/assets/javascripts/ide/components/repo_tabs.vue
index 47c75be3f7c..c03694e3619 100644
--- a/app/assets/javascripts/ide/components/repo_tabs.vue
+++ b/app/assets/javascripts/ide/components/repo_tabs.vue
@@ -1,5 +1,5 @@
<script>
-import { mapActions } from 'vuex';
+import { mapActions, mapGetters } from 'vuex';
import RepoTab from './repo_tab.vue';
export default {
@@ -20,6 +20,9 @@ export default {
required: true,
},
},
+ computed: {
+ ...mapGetters(['getUrlForPath']),
+ },
methods: {
...mapActions(['updateViewer', 'removePendingTab']),
openFileViewer(viewer) {
@@ -27,7 +30,7 @@ export default {
if (this.activeFile.pending) {
return this.removePendingTab(this.activeFile).then(() => {
- this.$router.push(`/project${this.activeFile.url}`);
+ this.$router.push(this.getUrlForPath(this.activeFile.path));
});
}