Skip to content

Commit

Permalink
Return the function directly instead of assigning first on `_extendTh…
Browse files Browse the repository at this point in the history
…eme`
  • Loading branch information
catuhana committed Aug 16, 2024
1 parent 7f4b1c1 commit 502b5c4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const _extendTheme = <Theme extends object = object>(
//* by UnoCSS. I think we could type-safe the parts we have
//* (`ThemeObject` type), but I'm not sure how to do that.
// deno-lint-ignore no-explicit-any
const extendTheme = (theme: any): void => {
return (theme: any): void => {
theme['colors'] ??= {};

// Determine the target object where the colours will be added
Expand Down Expand Up @@ -58,6 +58,4 @@ export const _extendTheme = <Theme extends object = object>(
}
}
};

return extendTheme;
};

0 comments on commit 502b5c4

Please sign in to comment.