From e23a3e98be1693a060623d219f3330972b605fd8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 4 Feb 2020 15:27:38 +0000 Subject: [PATCH] Only enumerate settings handlers which are supported currently --- src/settings/SettingsStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/SettingsStore.js b/src/settings/SettingsStore.js index b1d61197a0..a65137631d 100644 --- a/src/settings/SettingsStore.js +++ b/src/settings/SettingsStore.js @@ -564,7 +564,7 @@ export default class SettingsStore { const handlers = {}; for (const level of SETTINGS[settingName].supportedLevels) { if (!LEVEL_HANDLERS[level]) throw new Error("Unexpected level " + level); - handlers[level] = LEVEL_HANDLERS[level]; + if (SettingsStore.isLevelSupported(level)) handlers[level] = LEVEL_HANDLERS[level]; } // Always support 'default'