How to understand this ERROR?

I have tried a buch of different code-variations but without any success.
The code is still working, but i want to get rid of the error-info.

but you’re not returning anything in your else code block, which means the function will return void , or in other words, NOTHING , and obviously, you can’t assign null or undefined to the data property,
Ok, changing my → else ← to …

return  [
   {
       "_id": "1",
       "firstName": "John",
       "lastName": "Doe",
       "image": "http://someImageUrl/john.jpg"
    },
    {
       "_id": "2",
       "firstName": "Jane",
       "lastName": "Doe",
       "image": "http://someImageUrl/jane.jpg"
    }
]

This is exact the value, what the repeater expects to be feeded with.
Example from REPEATER-API.

Now i have in both cases (if/else) the right prepared DATA for repeater to be feeded with. But still the same ERROR.

I think i missunderstand something. Could you make an example. What to fix exactly?

BTW: Putting the given results directly to repeater removes the error.

I am confused. :sweat_smile: