Skip to content

Commit

Permalink
fix(utils): add nil check for g:colors_name
Browse files Browse the repository at this point in the history
Signed-off-by: Jint-lzxy <[email protected]>
  • Loading branch information
Jint-lzxy committed Jan 24, 2025
1 parent 9ec8f84 commit e7bbbf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/modules/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ local function init_palette()
end

if not palette then
palette = vim.g.colors_name:find("catppuccin") and require("catppuccin.palettes").get_palette()
palette = (vim.g.colors_name or ""):find("catppuccin") and require("catppuccin.palettes").get_palette()
or {
rosewater = "#DC8A78",
flamingo = "#DD7878",
Expand Down

0 comments on commit e7bbbf2

Please sign in to comment.