summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/actions.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-09-03 13:56:30 +0100
committerPhil Hughes <me@iamphill.com>2018-09-07 08:24:42 +0100
commit3f6500383fb6bc66cb695592dd48e65a28a0d1b5 (patch)
tree737f6a5b8b5c62c0b899b77b0bf8e67ee282e03b /app/assets/javascripts/ide/stores/actions.js
parent5b84c2fbc270a0072ddf067742ab268926eb087e (diff)
downloadgitlab-ce-3f6500383fb6bc66cb695592dd48e65a28a0d1b5.tar.gz
fixed some bugs around with the template dropdowns
Diffstat (limited to 'app/assets/javascripts/ide/stores/actions.js')
-rw-r--r--app/assets/javascripts/ide/stores/actions.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js
index aa02dfbddc4..aa6ca3f29cd 100644
--- a/app/assets/javascripts/ide/stores/actions.js
+++ b/app/assets/javascripts/ide/stores/actions.js
@@ -206,6 +206,7 @@ export const resetOpenFiles = ({ commit }) => commit(types.RESET_OPEN_FILES);
export const renameEntry = ({ dispatch, commit, state }, { path, name, entryPath = null }) => {
const entry = state.entries[entryPath || path];
+
commit(types.RENAME_ENTRY, { path, name, entryPath });
if (entry.type === 'tree') {
@@ -214,7 +215,7 @@ export const renameEntry = ({ dispatch, commit, state }, { path, name, entryPath
);
}
- if (!entryPath) {
+ if (!entryPath && !entry.tempFile) {
dispatch('deleteEntry', path);
}
};