Merge pull request #4034 from matrix-org/t3chguy/s1

Only enumerate settings handlers which are supported
pull/21833/head
Michael Telatynski 2020-02-05 10:16:03 +00:00 committed by GitHub
commit d8d8dd4508
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,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'