safe
safe copied to clipboard
It looks like the function current is missing
This family of functions can return false because they are empty, or can return false because the element contains an element with the value false, so one can't spot the error by looking just at the return value.
We could potentially add special-cases for this family of functions where we first check the length of the array, throw an exception if the array is empty, and then go on to return whatever the function returns, but that's slightly less-trivial