Commit 8ff4459a authored by Andrew Hrdy's avatar Andrew Hrdy

Fix error caused from linting change.

parent 2806cdb7
Pipeline #1929 passed with stage
in 1 minute and 41 seconds
......@@ -27,8 +27,9 @@ export const setFacilities = (facilities) => {
try {
localStorage.setItem('facilities', facilities);
} catch (e) {
console.error('Set localstorage fail for facilities.');
//Empty
}
return {
type: SET_FACILITIES,
facilities: JSON.parse(facilities)
......
......@@ -14,18 +14,22 @@ const WeekHours = ({facility}) => {
];
const output = [];
let index = 0;
for (let dayOfWeek = 0; dayOfWeek < 7; dayOfWeek++) {
const todaysHours = facilityUtils.getHoursByDay(facility, dayOfWeek);
for (let i = 0; i < todaysHours.length; i++) {
output[index] = (
<Grid container spacing={0} key={facility.slug + index} className="week-hours-row">
<Grid item xs={2} className="week-hours-day">{weekDays[dayOfWeek]}</Grid>
<Grid item className="week-hours-times">{todaysHours[i].text}</Grid>
</Grid>
);
index++;
try {
let index = 0;
for (let dayOfWeek = 0; dayOfWeek < 7; dayOfWeek++) {
const todaysHours = facilityUtils.getHoursByDay(facility, dayOfWeek);
for (let i = 0; i < todaysHours.length; i++) {
output[index] = (
<Grid container spacing={0} key={facility.slug + index} className="week-hours-row">
<Grid item xs={2} className="week-hours-day">{weekDays[dayOfWeek]}</Grid>
<Grid item className="week-hours-times">{todaysHours[i].text}</Grid>
</Grid>
);
index++;
}
}
} catch (e) {
//Empty
}
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment