Skip to content

Commit

Permalink
perf: remove unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelot committed Sep 5, 2022
1 parent 5b72a6a commit ff0e044
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lua/heirline/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ function StatusLine:new(child, index)
local restrict = vim.tbl_extend("force", default_restrict, self.restrict or {})
setmetatable(new, self)
self.__index = function(t, v)
if restrict[v] then
return nil
else
if not restrict[v] then
return self[v]
end
end
Expand Down

0 comments on commit ff0e044

Please sign in to comment.