Skip to content

Commit 37ad2a4

Browse files
committed
fix(status): protect table indexing
1 parent d958ad0 commit 37ad2a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/astroui/status/hl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ end
5959
---@return function # for setting hl property in a component
6060
-- @usage local heirline_component = { provider = "Example Provider", hl = require("astroui.status").hl.file_icon("winbar") },
6161
function M.file_icon(name)
62-
local hl_enabled = config.icon_highlights.file_icon[name]
62+
local hl_enabled = vim.tbl_get(config, "icon_highlights", "file_icon", name)
6363
return function(self)
6464
if hl_enabled == true or (type(hl_enabled) == "function" and hl_enabled(self)) then
6565
return M.filetype_color(self)

0 commit comments

Comments
 (0)