fix: make theme logic safe and add better e2e tests (#16959)
* fix: improve theme logic * remove null from ThemeLabelProps value * add better e2e tests
This commit is contained in:
1 parent
b0bfec7247
commit
21dd44733f
6 files changed
+127
-23
No files matched your search
@@ -8,6 +8,10 @@ type CssVariables = Record<string, string>;
|
||||
const useCalcomTheme = (theme: Record<string, CssVariables>) => {
|
||||
useEffect(() => {
|
||||
Object.entries(theme).forEach(([key, value]) => {
|
||||
if (!value) {
|
||||
// should not be reached
|
||||
return;
|
||||
}
|
||||
if (key === "root") {
|
||||
const root = document.documentElement;
|
||||
Object.entries(value).forEach(([key, value]) => {
|
||||
|
||||
Reference in new issue
Block a user