Skip to content

Commit 373aea1

Browse files
committed
Fix issue with a locations with no hours having no status
1 parent 6ec0429 commit 373aea1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

public/partials/grid.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
2-
$first_day = $days[array_key_first($days)]['text']['status'];
2+
try {
3+
$first_day = $days[array_key_first($days)]['text']['status'];
4+
} catch (TypeError $e) {
5+
$first_day = 'closed';
6+
}
7+
38
$open_class = ($first_day == 'open') ? 'circle-green' : 'circle-red';
49
$stacked = $attrs['display_type'] == 'stacked';
510
$hours_display = ($stacked) ? '-stacked' : '';

0 commit comments

Comments
 (0)