From a3103f14baf289d4274f673e386db4c56bc414a3 Mon Sep 17 00:00:00 2001 From: ebolam Date: Sun, 27 Nov 2022 11:06:51 -0500 Subject: [PATCH] Fix for back showing the options area even when there is no data. --- static/koboldai.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/koboldai.js b/static/koboldai.js index 67bbbcdb..fcf75bef 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -266,7 +266,6 @@ function create_options(action) { if (action.id != current_action+1) { return; } - document.getElementById('main-grid').setAttribute('option_length', action.action.Options.length); var option_chunk = document.getElementById("Select Options"); //first, let's clear out our existing data @@ -294,9 +293,12 @@ function create_options(action) { } console.log("seen_prev_selection: "+seen_prev_selection+" show_options: "+show_options); if (!(show_options)) { + document.getElementById('main-grid').setAttribute('option_length', 0); return; } + document.getElementById('main-grid').setAttribute('option_length', action.action.Options.length); + var table = document.createElement("div"); table.classList.add("sequences"); //Add Redo options