🐛 commit filename changes upon saving sketch
This commit is contained in:
parent
434cf6da21
commit
26df651f2f
1 changed files with 3 additions and 1 deletions
|
@ -132,7 +132,9 @@ export function saveProject(selectedFile = null, autosave = false) {
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
}
|
}
|
||||||
const formParams = Object.assign({}, state.project);
|
const formParams = Object.assign({}, state.project);
|
||||||
formParams.files = [...state.files];
|
formParams.files = [...state.files.map(file => ({ ...file, name: file.updatedName || file.name }))];
|
||||||
|
formParams.files.forEach((file) => { delete file.updatedName; });
|
||||||
|
|
||||||
if (selectedFile) {
|
if (selectedFile) {
|
||||||
const fileToUpdate = formParams.files.find(file => file.id === selectedFile.id);
|
const fileToUpdate = formParams.files.find(file => file.id === selectedFile.id);
|
||||||
fileToUpdate.content = selectedFile.content;
|
fileToUpdate.content = selectedFile.content;
|
||||||
|
|
Loading…
Reference in a new issue