From 5144ae22206e7736281c209aaec30e6e5f3c011f Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Mon, 1 May 2023 17:43:27 +0300 Subject: [PATCH] Simplify logic of disabling the WI entry --- public/scripts/world-info.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index a534e473d..3fb0c6b22 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -477,15 +477,15 @@ function checkWorldInfo(chat) { let activatedNow = new Set(); for (let entry of sortedEntries) { - if (allActivatedEntries.has(entry.uid) && entry.disable == false) { + if (allActivatedEntries.has(entry.uid) || entry.disable == true) { continue; } - if (entry.constant && entry.disable == false) { + if (entry.constant) { activatedNow.add(entry.uid); } - if (Array.isArray(entry.key) && entry.key.length && entry.disable == false) { + if (Array.isArray(entry.key) && entry.key.length) { primary: for (let key of entry.key) { if (key && textToScan.includes(key.trim().toLowerCase())) { if (