diff options
| -rw-r--r-- | lua/pets.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lua/pets.lua b/lua/pets.lua index d82945f..2191e2f 100644 --- a/lua/pets.lua +++ b/lua/pets.lua @@ -54,11 +54,13 @@ function M.kill_all() end function M.list() - if #M.pets == 0 then - print("You have no pets :(") - end + local empty = true for pet in pairs(M.pets) do print(pet) + empty = false + end + if empty then + print("You have no pets :(") end end |