Skip to content

Commit

Permalink
fix(globe): ignore markers without position (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach committed Aug 13, 2020
1 parent fef1fd5 commit c3cf446
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/scripts/hooks/use-story-markers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ export const useStoryMarkers = () => {
return [];
}

const storyMarkers = stories.map(story => ({
id: story.id,
title: story.title,
position: story.position
}));
const storyMarkers = stories
.map(story => ({
id: story.id,
title: story.title,
position: story.position
}))
.filter(marker => marker.position);

return storyMarkers;
};

0 comments on commit c3cf446

Please sign in to comment.