The logic tried to do an early return, but that doesn't work with ||, so
use && and check if there are >0 elements in the list, otherwise return
a list containing only 0.
This fixes a qml error message:
file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:375: TypeError: Type error