mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Fix app init
This commit is contained in:
parent
9637b3fbe1
commit
581e5f1f04
@ -194,7 +194,7 @@ async function showSamplerSelectPopup() {
|
||||
|
||||
function setSamplerListListeners() {
|
||||
// Goal 2: hide unchecked samplers from DOM
|
||||
let listContainer = $('#apiSamplersList')
|
||||
let listContainer = $('#apiSamplersList');
|
||||
listContainer.find('input').off('change').on('change', async function () {
|
||||
|
||||
const samplerName = this.name.replace('_checkbox', '');
|
||||
@ -353,6 +353,9 @@ async function listSamplers(main_api, arrayOnly = false) {
|
||||
export async function validateDisabledSamplers(redraw = false) {
|
||||
const APISamplers = await listSamplers(main_api, true);
|
||||
|
||||
if (!Array.isArray(APISamplers)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const sampler of APISamplers) {
|
||||
let relatedDOMElement = $(`#${sampler}_${main_api}`).parent();
|
||||
|
Loading…
Reference in New Issue
Block a user