Skip to content

Bug: routes.some is not a function #16

@mattwalo32

Description

@mattwalo32

I was using the site and it crashed with this error:

Image

Which corresponds to this snippet:

Image

I opened the network tab and looked at the response from the /stations endpoint. Out of the 1123 stations returned, 6 of them had their routes field set to an empty string instead of an array. For example, here's a response for one of the stations in the returned body:

{
  "city": "Orlando",
  "code": "MCO",
  "connections": "",
  "id": "MCO",
  "lat": 28.41453,
  "lon": -81.30818,
  "name": "Orlando Station",
  "nearbyCities": "",
  "routes": "",
  "stateLong": "Florida",
  "stateShort": "FL",
  "thruway": false,
  "frequency": 0
}

This doesn't happen consistently, only sometimes. I was going to put up a PR but seems like this is more of a backend issue, which I don't see a repo for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions