score:0

if (state.filterdata) {
  const data = state.filterdata.filter((data) => {
   return (data.type = "special");
  }); 
}

in the above code, you are assigning "special" in data.type using assignment operator(=). use comparison operator(== / ===) instead of assignment(=)

solution -

   data.type === "special"

Related Query

More Query from same tag