I came upon this problem when refactoring a purpose to return an object in place of an array, but I forgot to update the return value Within the if assertion. J0HNJ0HN 27k55 gold badges5858 silver badges8888 bronze badges 5 93 The complete context (most-upvoted reply) is nice, but this solution https://conscientgurugram.in/