Fix calculatedAtLevel definition

This commit is contained in:
Travis Ralston 2020-07-30 08:41:51 -06:00
parent 7f404b0fe5
commit ad7c94917d
4 changed files with 20 additions and 5 deletions

View file

@ -22,7 +22,12 @@ import { SettingLevel } from "../SettingLevel";
export default class ThemeController extends SettingController {
public static isLogin = false;
public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any, calculatedAtLevel: any): any {
public getValueOverride(
level: SettingLevel,
roomId: string,
calculatedValue: any,
calculatedAtLevel: SettingLevel,
): any {
if (!calculatedValue) return null; // Don't override null themes
if (ThemeController.isLogin) return 'light';