From 39362fd5660e744858ed57d6d0fff5023698e4d5 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 23 Jun 2024 18:41:49 +0300 Subject: [PATCH] Fix some type errors --- public/scripts/world-info.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 491b90ff0..4f02ab0d3 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1791,7 +1791,8 @@ function customTokenizer(input, _selection, callback) { // Now remove the token from the current input, and the comma too current = current.slice(i + 1); - insideRegex = false, regexClosed = false; + insideRegex = false; + regexClosed = false; i = 0; } } @@ -2866,6 +2867,12 @@ const newEntryTemplate = Object.fromEntries( Object.entries(newEntryDefinition).map(([key, value]) => [key, value.default]), ); +/** + * Creates a new world info entry from template. + * @param {string} _name Name of the WI (unused) + * @param {any} data WI data + * @returns {object | undefined} New entry object or undefined if failed + */ function createWorldInfoEntry(_name, data) { const newUid = getFreeWorldEntryUid(data);