From 029576f78607e488e9ba307d60da3efda2a25144 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Sat, 14 Dec 2019 14:35:55 -0500 Subject: [PATCH] fix: don't change uri when re-selecting file --- ui/component/publishFile/view.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/component/publishFile/view.jsx b/ui/component/publishFile/view.jsx index 0927ea13f..2aea0da93 100644 --- a/ui/component/publishFile/view.jsx +++ b/ui/component/publishFile/view.jsx @@ -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); }