From 42216adb4d6adc595b922726a3ac55359a22f096 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 22 Feb 2024 19:14:54 +0200 Subject: [PATCH] fix anon view --- src/services/theme_data/theme2_to_theme3.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/theme_data/theme2_to_theme3.js b/src/services/theme_data/theme2_to_theme3.js index 11f517c6e..2f581b34a 100644 --- a/src/services/theme_data/theme2_to_theme3.js +++ b/src/services/theme_data/theme2_to_theme3.js @@ -205,7 +205,7 @@ export const convertTheme2To3 = (data) => { const convertRadii = () => { const newRules = [] - Object.keys(data.radii).forEach(key => { + Object.keys(data.radii || {}).forEach(key => { if (!radiiKeys.has(key) || data.radii[key] === undefined) return null const originalRadius = data.radii[key] const rule = {} @@ -258,7 +258,7 @@ export const convertTheme2To3 = (data) => { const convertFonts = () => { const newRules = [] - Object.keys(data.fonts).forEach(key => { + Object.keys(data.fonts || {}).forEach(key => { if (!fontsKeys.has(key)) return const originalFont = data.fonts[key].family const rule = {} @@ -292,7 +292,7 @@ export const convertTheme2To3 = (data) => { } const convertShadows = () => { const newRules = [] - Object.keys(data.shadows).forEach(key => { + Object.keys(data.shadows || {}).forEach(key => { if (!shadowsKeys.has(key)) return const originalShadow = data.shadows[key] const rule = {}