fix: don't change uri when re-selecting file

This commit is contained in:
Thomas Zarebczan 2019-12-14 14:35:55 -05:00
parent 508f2249ba
commit 029576f786

View file

@ -56,7 +56,9 @@ function PublishFile(props: Props) {
let fileName = file.name.substr(0, file.name.lastIndexOf('.')) || file.name;
let replaceChars = new RegExp(regexInvalidURI, 'gu');
let parsedFileName = fileName.replace(replaceChars, '-');
publishFormParams.name = parsedFileName;
if (!isStillEditing) {
publishFormParams.name = parsedFileName;
}
updatePublishForm(publishFormParams);
}