Fix some type errors

This commit is contained in:
Cohee
2024-06-23 18:41:49 +03:00
parent 5de80f4c6d
commit 39362fd566

View File

@@ -1791,7 +1791,8 @@ function customTokenizer(input, _selection, callback) {
// Now remove the token from the current input, and the comma too // Now remove the token from the current input, and the comma too
current = current.slice(i + 1); current = current.slice(i + 1);
insideRegex = false, regexClosed = false; insideRegex = false;
regexClosed = false;
i = 0; i = 0;
} }
} }
@@ -2866,6 +2867,12 @@ const newEntryTemplate = Object.fromEntries(
Object.entries(newEntryDefinition).map(([key, value]) => [key, value.default]), 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) { function createWorldInfoEntry(_name, data) {
const newUid = getFreeWorldEntryUid(data); const newUid = getFreeWorldEntryUid(data);