Skip to content

Commit 5e3a13b

Browse files
committed
fix: reverted finding pattern path logic
1 parent 249ffd4 commit 5e3a13b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/components/sheets/RouteDetails.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ const RouteDetails: React.FC<SheetProps> = ({ sheetRef }) => {
6969
// Filters patternPaths for only the selected route from all patternPaths
7070
function getPatternPathForSelectedRoute(): IPatternPath | undefined {
7171
if (!selectedRoute) return undefined;
72-
return selectedRoute.patternPaths[selectedDirectionIndex];
72+
return selectedRoute.patternPaths.find(
73+
(direction) =>
74+
direction.patternKey ===
75+
selectedRoute.directionList[selectedDirectionIndex]?.patternList[0]
76+
?.key,
77+
);
7378
}
7479

7580
const handleDismiss = () => {

0 commit comments

Comments
 (0)