diff options
| author | Giuseppe Gadola <giusgadola@gmail.com> | 2023-02-15 12:43:39 +0100 |
|---|---|---|
| committer | Giuseppe Gadola <giusgadola@gmail.com> | 2023-02-15 12:43:39 +0100 |
| commit | e9e37d7d95f2bc8ec59d1f9e460a6daea0849536 (patch) | |
| tree | b9ee6602cf32b9f8da60c8dfa5d1a62afd184549 | |
| parent | docs(help): auto generate docs (diff) | |
fix(commands): fixed pets list
| -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 |