From 3597b5a9058f606f636f6261e62e152f28e009ed Mon Sep 17 00:00:00 2001 From: Cevo Date: Thu, 8 Oct 2015 15:39:09 +0200 Subject: [PATCH] console logs a removed head checking and default in the case of undefined head added --- js/components/header.js | 9 +++++++-- js/utils/head_setter.js | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/components/header.js b/js/components/header.js index 8ffc08eb..b1a03e02 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -65,8 +65,13 @@ let Header = React.createClass({ }, getLogo(){ let whitelabel = this.state.whitelabel; - setTitle(whitelabel.title) - constructHead(whitelabel.head); + if (whitelabel.title && whitelabel.head) { + setTitle(whitelabel.title); + constructHead(whitelabel.head); + } + else{ + setTitle('ascribe'); + } if (whitelabel.subdomain !== 'www'){ return (); } diff --git a/js/utils/head_setter.js b/js/utils/head_setter.js index a44a1c22..54e037cd 100644 --- a/js/utils/head_setter.js +++ b/js/utils/head_setter.js @@ -10,8 +10,6 @@ function constructHeadElement(elementType, elementId, elementAttributes) { let oldElement = document.getElementById(elementId); for (let k in elementAttributes){ try { - console.log('Setting favicons'); - console.log(elementAttributes[k]); element.setAttribute(k, elementAttributes[k]); } catch(e){