Skip to content

Commit dc65d41

Browse files
committed
Fix room-change.
1 parent 02d6018 commit dc65d41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/schedule/day.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ for (let i = 0; i < sessionAndTimes.length - 1; i++) {
141141
if (nextStart !== end) {
142142
const duration = differenceInMinutes(nextStart, end);
143143

144-
if (duration === 5) {
144+
if (duration >= 5) {
145145
const roomChangeStart = end;
146146
const roomChangeTime = format(roomChangeStart, "HH:mm");
147147
const roomChangeEnd = addMinutes(roomChangeStart, 5);
@@ -167,7 +167,9 @@ for (let i = 0; i < sessionAndTimes.length - 1; i++) {
167167
},
168168
];
169169
} else {
170-
console.warn("Missing room change", end, nextStart, duration);
170+
if (duration != 0){
171+
console.warn("Missing room change", end, nextStart, duration);
172+
}
171173
}
172174
}
173175
}

0 commit comments

Comments
 (0)