From 9179f9d0627c25038e0458214bf672338fdc91db Mon Sep 17 00:00:00 2001
From: Hermann <blumh@ethz.ch>
Date: Sat, 27 Oct 2018 23:33:28 +0200
Subject: [PATCH] bugfix if department is not set

---
 src/studydocs/list.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/studydocs/list.js b/src/studydocs/list.js
index f94c611..873263b 100644
--- a/src/studydocs/list.js
+++ b/src/studydocs/list.js
@@ -15,7 +15,7 @@ export default class StudydocTable {
   getItemData(data) {
     return [
       m('div', { style: { width: 'calc(100% - 32em)' } }, data.title),
-      m('div', { style: { width: '6em' } }, data.department.toUpperCase()),
+      m('div', { style: { width: '6em' } }, data.department && data.department.toUpperCase()),
       m('div', { style: { width: '6em' } }, data.semester),
       m('div', { style: { width: '10em' } }, data.lecture),
       m('div', { style: { width: '10em' } }, data.files.map((file) => {
-- 
GitLab