I am having an issue here with getting my data. So I want to filter out any that has an invoice_status of "Draft"
or "Ready to Bill"
, or "Cancelled"
or if it's invoice_status is null AND status is null
Everything is being filtered out correctly except any data that has both invoice_status is null AND status is null
is not being filtered out. What is the issue with my code below?
console.log(
"data...",
this.props.partnerOrders.filter(
r =>
(r.invoice_status !== "Draft" &&
r.invoice_status !== "Ready to Bill" &&
r.invoice_status !== "Cancelled") ||
(r.invoice_status !== null && r.status !== null)
)
);