From 492873b8ff70b5710388dc73646ca867a8d4e300 Mon Sep 17 00:00:00 2001 From: Libor Polčák Date: Nov 01 2022 14:33:41 +0000 Subject: update.js: Bugfix: Do not replace Experimental level with 2 Instead of hardcoding the levels, use the dynamic level array --- diff --git a/common/update.js b/common/update.js index 0a0d1d0..1f556f5 100644 --- a/common/update.js +++ b/common/update.js @@ -476,7 +476,7 @@ async function checkAndSaveConfig(conf) { checkExistAndType("fpDetectionOn", "boolean", false); checkExistAndType("custom_levels", "object", {}); if (!("__default__" in conf) || typeof(conf.__default__) !== "string" || - (!(conf.__default__ in [0,1,2,3]) && !(conf.__default__ in conf.custom_levels))) { + (!(conf.__default__ in levels))) { conf.__default__ = "2"; } checkExistAndType("nbsWhitelist", "object", {});