Skip to content

Commit

Permalink
fix(theme): add optional chaining for custom theme checks
Browse files Browse the repository at this point in the history
  • Loading branch information
SutuSebastian committed Jan 22, 2025
1 parent 80e6565 commit ec5d379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/helpers/resolve-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export function resolveTheme<T>(

let theme = baseTheme;

if (_custom.length) {
if (_custom?.length) {
theme = deepMergeStrings(twMerge)(baseTheme, ...custom) as T;
}

if (_applyThemeList?.length && _custom.length) {
if (_applyThemeList?.length && _custom?.length) {
const finalApplyTheme = cloneWithValue<T, ApplyTheme>(baseTheme, "merge");

let run = false;
Expand Down

0 comments on commit ec5d379

Please sign in to comment.