Home > front end >  Just traverse to tell the find is not a function of how to return a responsibility
Just traverse to tell the find is not a function of how to return a responsibility

Time:05-26

The code
Conceal (ships: any ship, the ship, and the state: ShipState) : void {
If (ships) {
Let the list=ships. The map ((item: any)=& gt; {
Item. Ship_mmsi==ship. Mmsi
});
If (! The list) {
State. The visible=false;
}
}

}



Browser error: Uncaught TypeError: ships. The find is not a function

CodePudding user response:

Your console log print log to see if the ships under an array,

As follows, for a numeric. The find would be an error, not a function

 a=121 
A.f ind (item=& gt; {})
Uncaught TypeError: a.f ind is not a function

CodePudding user response:

Is an array of

CodePudding user response:

Look not to understand what are you going to write the code if you want to filter the same with the filter mmsi, why write a comparison in the map

CodePudding user response:

You have to do an error and you send code?
  • Related