aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/lib')
-rw-r--r--src/client/react/lib/extractSchedule.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/react/lib/extractSchedule.js b/src/client/react/lib/extractSchedule.js
index 97589f8..6f30970 100644
--- a/src/client/react/lib/extractSchedule.js
+++ b/src/client/react/lib/extractSchedule.js
@@ -19,12 +19,11 @@
*/
export default function extractSchedule(schedules, user, week) {
- const scheduleExists =
- schedules.hasOwnProperty(user) && schedules[user].hasOwnProperty(week);
+ const scheduleExists = schedules.hasOwnProperty(`${user}:${week}`);
if (!scheduleExists) {
return { state: 'NOT_REQUESTED' };
}
- return schedules[user][week];
+ return schedules[`${user}:${week}`];
}