Commit 7436d869 authored by Tom Kunze's avatar Tom Kunze
Browse files

server/cipmap-ui.js: Fix error on missing lecture cookie.

parent 7bcf8c90
......@@ -93,7 +93,12 @@ function setHostnameCookie(hostname){
}
function getLecture() {
return JSON.parse(ck_api.get('lecture'));
var lectureJson = ck_api.get('lecture');
if (lectureJson === undefined) {
return undefined;
}
return JSON.parse(lectureJson);
}
function setLecture(id, name) {
......
Supports Markdown
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