refactor: polish code, logo

This commit is contained in:
Richard 2024-02-25 12:05:59 -08:00
parent 18723c1377
commit e7a1f5d235
7 changed files with 14 additions and 19 deletions

View file

@ -55,9 +55,10 @@ local function split<Item, Key>(
for key, item in previousItems do
local id = if keyExtractor then keyExtractor(item) else key
local atom = atoms[id]
if itemsByKeys[id] == nil then
atoms[id]:unmount()
if itemsByKeys[id] == nil and atom then
atom:unmount()
atoms[id] = nil
end
end