I get null in data field when query products of an active deal which has products_count = 0.
I would expect empty array ([]), not null.
I get null in data field when query products of an active deal which has products_count = 0.
I would expect empty array ([]), not null.
Hi @voroninp,
It’s a pretty valid point really. The honest answer is that this is simply how our code was originally written (to return null) and we have stuck with it, but one thing to note is that an empty array means some memory is allocated to it while null would mean it is empty.
It is certainly food for thought though and perhaps something we can look into again and maybe change.