diff --git a/ui/index.html b/ui/index.html
index bfef5c43..e49a4566 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -697,7 +697,7 @@ async function makeImage() {
function createFileName() {
// Most important information is the prompt
- const underscoreName = promptField.value = promptField.value.replace(/[^a-zA-Z0-9]/g, '_');
+ const underscoreName = promptField.value.replace(/[^a-zA-Z0-9]/g, '_');
const seed = seedField.value;
const steps = numInferenceStepsField.value;
const guidance = guidanceScaleField.value;