summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/actions/file.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-05-04 15:26:55 +0100
committerPhil Hughes <me@iamphill.com>2018-05-04 15:26:55 +0100
commit8a21c31b8b2baf19b1433ab5175fbc8bd66d07c6 (patch)
tree9c22064915d04db3b43fe86bac78d205d26de0d4 /app/assets/javascripts/ide/stores/actions/file.js
parent616c1c7294646e74706cb13be0517383a73b3c27 (diff)
parent9f2f8679bec1e2d4161c429c2e6db80a20e376c9 (diff)
downloadgitlab-ce-8a21c31b8b2baf19b1433ab5175fbc8bd66d07c6.tar.gz
Merge branch '44846-improve-web-ide-left-panel-and-modes' into ide-sidebar-commit-box
Diffstat (limited to 'app/assets/javascripts/ide/stores/actions/file.js')
-rw-r--r--app/assets/javascripts/ide/stores/actions/file.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js
index 885584e77ac..fc163cd021a 100644
--- a/app/assets/javascripts/ide/stores/actions/file.js
+++ b/app/assets/javascripts/ide/stores/actions/file.js
@@ -5,6 +5,7 @@ import service from '../../services';
import * as types from '../mutation_types';
import router from '../../ide_router';
import { setPageTitle } from '../utils';
+import { viewerTypes } from '../../constants';
export const closeFile = ({ commit, state, dispatch }, file) => {
const path = file.path;
@@ -23,7 +24,7 @@ export const closeFile = ({ commit, state, dispatch }, file) => {
const nextFileToOpen = state.openFiles[nextIndexToOpen];
if (nextFileToOpen.pending) {
- dispatch('updateViewer', 'diff');
+ dispatch('updateViewer', viewerTypes.diff);
dispatch('openPendingTab', {
file: nextFileToOpen,
keyPrefix: nextFileToOpen.staged ? 'staged' : 'unstaged',