Skip to content

Commit

Permalink
feat(#2948): additional user decorator safety
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Dec 1, 2024
1 parent 9e30e9f commit a063280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/nvim-tree/renderer/builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function Builder:new(args)
builtin = BUILTIN_DECORATORS[d]

---@type UserDecorator
user = d.as and d:as(UserDecorator)
user = type(d) == "table" and type(d.as) == "function" and d:as(UserDecorator)

if builtin then
table.insert(self.decorators, builtin({ explorer = self.explorer }))
Expand Down

0 comments on commit a063280

Please sign in to comment.