From 0cdcc7c6f95ec0c87750ec4d68bac82ec600391d Mon Sep 17 00:00:00 2001
From: Cliff Li <lic@student.ethz.ch>
Date: Sat, 17 Mar 2018 22:10:01 +0100
Subject: [PATCH] Minor fix

---
 src/views/frontpage.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/views/frontpage.js b/src/views/frontpage.js
index 2474fd34..645e6171 100644
--- a/src/views/frontpage.js
+++ b/src/views/frontpage.js
@@ -7,7 +7,7 @@ const date = `${new Date().toISOString().split('.')[0]}Z`;
 // Render the frontpage cards, with href and imageurl
 const renderCards = item => {
   const { title, href } = item;
-  const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : null;
+  const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : '';
   return m(
     'div.frontpage-card',
     { style: `background-image: url(${imageurl})` },
@@ -18,7 +18,7 @@ const renderCards = item => {
 // Render the Hot Cards, with link and imageurl
 const renderHotCards = (item, index) => {
   const { title, href } = item;
-  const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : null;
+  const imageurl = item.img_infoscreen ? `${apiUrl}${item.img_infoscreen.file}` : '';
   if (index === 0) {
     return m(
       'div.hot-first-card',
-- 
GitLab