From eb3172b1fdb3231225e2af5a0b5cfc050e2edd06 Mon Sep 17 00:00:00 2001 From: Myryk Date: Mon, 3 Jun 2024 11:59:08 +0200 Subject: [PATCH] substitution works again --- .config/ags/modules/.configuration/user_options.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.config/ags/modules/.configuration/user_options.js b/.config/ags/modules/.configuration/user_options.js index 05483add..cb2f13c3 100644 --- a/.config/ags/modules/.configuration/user_options.js +++ b/.config/ags/modules/.configuration/user_options.js @@ -193,11 +193,15 @@ let configOptions = { // Override defaults with user's options let optionsOkay = true; -function overrideConfigRecursive(userOverrides, configOptions = {}) { +function overrideConfigRecursive(userOverrides, configOptions = {}, check = true) { for (const [key, value] of Object.entries(userOverrides)) { - if (configOptions[key] === undefined) optionsOkay = false; + if (configOptions[key] === undefined && check) { + optionsOkay = false; + } else if (typeof value === 'object') { - overrideConfigRecursive(value, configOptions[key]); + if (key === "substitutions" || key === "regexSubstitutions") { + overrideConfigRecursive(value, configOptions[key], false); + } else overrideConfigRecursive(value, configOptions[key]); } else { configOptions[key] = value; }