Skip to content

Commit fda6d4c

Browse files
committed
fix: sort_by detect and use string and nil
1 parent d921a20 commit fda6d4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-tree/explorer/sorters.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ end
192192

193193
function M.setup(opts)
194194
M.sort_by = opts.sort_by
195-
if M.sort_by and type(M.sort_by) ~= "function" then
195+
if M.sort_by and type(M.sort_by) == "function" then
196196
M.node_comparator = M.sort_by
197197
elseif M.sort_by == "modification_time" then
198198
M.node_comparator = M.node_comparator_modification_time

0 commit comments

Comments
 (0)