Data is undefined when i use transform with firestore query ( not without transform )

Hello ,

If i use transform to sort my data, i get undefined (no data at all).

A video to explain what is the problem

If i run my query without transform everything is fine
If i run my query with transform AFTER run my query without transform , everything is fine
If i reload the page everything is broken ...
i need to run my query again without transform , then enable transform ...

How can i fix that ?
Thanks

my transform code :

  const data = {{ getAllTransactionCanceledOrOther.data }}
  const result = data.filter(({status}) => !status.includes('PENDING'))
  return result

The problem is this line:

const data = {{ getAllTransactionCanceledOrOther.data }}

The data variable is already available in the query built-in transformer.

Remove the const data = ... part from you code and it everything should be ok :slight_smile:

const result = data.filter(({status}) => !status.includes('PENDING'))
return result
1 Like

So this video help me

3"17 exactly
if i do simply that :
return data.filter(({status}) => !status.includes('PENDING'))

all working fine when i reload the page now