aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/schedule.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-09-08 21:44:45 +0200
committerNoah Loomans <noahloomans@gmail.com>2017-09-08 21:44:45 +0200
commit5aac32f72eca8c66e879583ce653d07bb3c7370f (patch)
treee529c41a917ce3f7f13183febc3ce666a6f627d4 /public/javascripts/schedule.js
parentb4a63e917d8e07f0b1422f5f4e145e46e223386e (diff)
parentc8d6527d802a64e19ef5e7141a9c817517d5a99f (diff)
Merge branch 'master' into beta
Diffstat (limited to 'public/javascripts/schedule.js')
-rw-r--r--public/javascripts/schedule.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/javascripts/schedule.js b/public/javascripts/schedule.js
index 657c4a0..38ad66d 100644
--- a/public/javascripts/schedule.js
+++ b/public/javascripts/schedule.js
@@ -1,3 +1,5 @@
+/* global VALID_WEEK_NUMBERS */
+
const EventEmitter = require('events')
const search = require('./search')
@@ -55,6 +57,9 @@ self.viewItem = function (week, selectedUser) {
if (selectedUser == null) {
self._removeChilds()
search.updateDom(selectedUser)
+ } else if (VALID_WEEK_NUMBERS.indexOf(week) === -1) {
+ self._handleError({ target: { status: 404 } });
+ return
} else {
const url = self._getURLOfUser(week, selectedUser)