diff --git a/packages/editor-ui/src/components/helpers.ts b/packages/editor-ui/src/components/helpers.ts index 5e592cfef87..332d99307c7 100644 --- a/packages/editor-ui/src/components/helpers.ts +++ b/packages/editor-ui/src/components/helpers.ts @@ -15,6 +15,11 @@ export function getAppNameFromCredType(name: string) { } export function getStyleTokenValue(name: string) { + if (window.localStorage.getItem(name)) { + return window.localStorage.getItem(name); + } const style = getComputedStyle(document.body); - return style.getPropertyValue(name); + const value = style.getPropertyValue(name); + window.localStorage.setItem(name, value); + return value; }