From 901189fcba235d09e7e705b12b8967c010eec757 Mon Sep 17 00:00:00 2001 From: melloware Date: Tue, 31 Oct 2023 14:45:02 -0400 Subject: [PATCH] Fix #5203: ComponentBase context could be undefined --- components/lib/componentbase/ComponentBase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/componentbase/ComponentBase.js b/components/lib/componentbase/ComponentBase.js index b83273353e..61f1154138 100644 --- a/components/lib/componentbase/ComponentBase.js +++ b/components/lib/componentbase/ComponentBase.js @@ -472,7 +472,7 @@ export const ComponentBase = { ptOptions: undefined, unstyled: false }, - context: undefined, + context: {}, globalCSS: undefined, classes: {}, styles: '', @@ -635,7 +635,7 @@ const _useDefaultPT = (callback, key, params) => { return _usePT(getDefaultPT(), callback, key, params); }; -export const useHandleStyle = (styles, isUnstyled = () => {}, config) => { +export const useHandleStyle = (styles = () => {}, config) => { const { name, styled = false, hostName = '' } = config; const globalCSS = _useGlobalPT(getOptionValue, 'global.css', ComponentBase.cParams);