Skip to content

Commit a063280

Browse files
committed
feat(#2948): additional user decorator safety
1 parent 9e30e9f commit a063280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function Builder:new(args)
8484
builtin = BUILTIN_DECORATORS[d]
8585

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

8989
if builtin then
9090
table.insert(self.decorators, builtin({ explorer = self.explorer }))

0 commit comments

Comments
 (0)