From ebeb556af9c99b491a83c72f83512683a02a82ad Mon Sep 17 00:00:00 2001 From: Web Dev 9000 Date: Sun, 4 Sep 2022 18:05:15 -0700 Subject: [PATCH] Fixed unintentionally removed lines --- static/dream_web/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/dream_web/index.js b/static/dream_web/index.js index 27086ebd17..76b0deb1e0 100644 --- a/static/dream_web/index.js +++ b/static/dream_web/index.js @@ -19,6 +19,7 @@ function appendOutput(src, seed, config) { outputNode.addEventListener('click', () => { let form = document.querySelector("#generate-form"); for (const [k, v] of new FormData(form)) { + if (k == 'initimg') { continue; } form.querySelector(`*[name=${k}]`).value = config[k]; } if (config.variation_amount > 0 || config.with_variations != '') { @@ -74,6 +75,7 @@ async function generateSubmit(form) { // Convert file data to base64 let formData = Object.fromEntries(new FormData(form)); + formData.initimg_name = formData.initimg.name formData.initimg = formData.initimg.name !== '' ? await toBase64(formData.initimg) : null; let strength = formData.strength;