Hello,
I have a page on my app and i pass a parameter to this page (refDoc: it's the reference of a document)
And at the root of the page i do a backend query document from reference and i give this refDoc to it.
It works fine BUT sometime the refDoc will be empty. And I if I pass an empty refDoc now I have this error.
But it's fine because if this refDoc is null i will not use the output of this query. So i would like just either don't run the query IF the refDoc is null. Either just ignor the error.
It's like this, I cannot ( and don't want) do a conditional builder because in the if true and if false will be the same element inside, it's just the output of the query i pass it in a small function and if it's nul or empty of whatever that just take an other value so it's fine if that return null.
I guess the best practice it's just to just not run the backend query but i don't know how to pass just the query in a if.