Only enumerate settings handlers which are supported currently

pull/21833/head
Michael Telatynski 2020-02-04 15:27:38 +00:00
parent 463bddb7e9
commit e23a3e98be
1 changed files with 1 additions and 1 deletions

View File

@ -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'