Skip to content

Commit 0afed00

Browse files
committed
Fix regression preventing fullscreen when period list is empty
1 parent 1c24780 commit 0afed00

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

app/assets/jsc/clock.coffee

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,8 @@ setInterval (->
5555
# Check if it's after school and respond appropriately.
5656
final = $("#periods ol li:last-child").find("time.finish").attr("datetime")
5757

58-
59-
# Check if period list is empty.
60-
if $("#periods ol li").length == 0
61-
$("#main").addClass "true"
62-
63-
6458
# Check if schedule exists.
65-
if time > final or !$("#periods").length
59+
if time > final or !$("#periods ol li").length
6660
$("#main").addClass "after"
6761
else
6862
$("#main").removeClass "after"

public/jsc/clock.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@
4444
}
4545
});
4646
final = $("#periods ol li:last-child").find("time.finish").attr("datetime");
47-
if ($("#periods ol li").length === 0) {
48-
$("#main").addClass("true");
49-
}
50-
if (time > final || !$("#periods").length) {
47+
if (time > final || !$("#periods ol li").length) {
5148
return $("#main").addClass("after");
5249
} else {
5350
return $("#main").removeClass("after");

0 commit comments

Comments
 (0)