Skip to content

Commit 0ec1bbb

Browse files
committed
Related to #91: Remove possible exception when close_area may be triggered multiple times
1 parent 4b11261 commit 0ec1bbb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/vimade/focus/core.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ local close_area = function(area)
8585
end
8686

8787
AREAS_SELF_LOOKUP[area.winid] = nil
88-
AREAS[area.id] = nil
89-
area.id = nil
88+
if area.id then
89+
AREAS[area.id] = nil
90+
area.id = nil
91+
end
9092
end
9193

9294
M.__init = function(args)

0 commit comments

Comments
 (0)