gtiosclub / Nomad

Fall 2024 Project
0 stars 2 forks source link

Bug when NomadStep.Direction has a null names array for a particular step #368

Closed VigneshSK17 closed 1 week ago

VigneshSK17 commented 1 week ago

@nac5504

When starting the second route "Mountains" in Community Favorites, it immediately crashes at DirectionView.swift:129.

This is because there is no nil coalescing done when accessing NomadStep.Direction.names, and Step from Mapbox may return nil sometimes for this field. I made the fix, it should just be one line.