Skip to content

Commit

Permalink
Fix type error that excluded intersections
Browse files Browse the repository at this point in the history
  • Loading branch information
steinbro committed Nov 23, 2024
1 parent 34b5950 commit 4e92abe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/composables/announcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function useAnnouncer() {
// Get names of intersecting roads by looking up each road individually
function getRoadNames(intersectionFeature: SoundscapeFeature): Promise<Set<string>> {
return Promise.all(
intersectionFeature.osm_ids.map((id: number) => cache.getFeatureByOsmId(String(id)))
intersectionFeature.osm_ids.map(id => cache.getFeatureByOsmId(id))
).then(
(roads) =>
new Set(
Expand Down
2 changes: 1 addition & 1 deletion src/state/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const cache = {
};
},

getFeatureByOsmId: async function(osm_id: string): Promise<SoundscapeFeature | null> {
getFeatureByOsmId: async function(osm_id: number): Promise<SoundscapeFeature | null> {
// Returns at most one feature, matching a single OSM ID (i.e. a road, not
// intersectionss involving that road).
return new Promise(async (resolve, reject) => {
Expand Down

0 comments on commit 4e92abe

Please sign in to comment.