From a6a667f5be3d4b27a1bf3079d6d135c6dc82e58b Mon Sep 17 00:00:00 2001
From: john <johnbarlas39@gmail.com>
Date: Mon, 30 Jan 2017 15:35:10 +0200
Subject: [PATCH] kill the upload icon if ink call fails

---
 app/components/BookBuilder/Chapter/ChapterTitle.jsx | 2 +-
 app/components/BookBuilder/Chapter/UploadButton.jsx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/components/BookBuilder/Chapter/ChapterTitle.jsx b/app/components/BookBuilder/Chapter/ChapterTitle.jsx
index 4e1ca50..c4fc212 100644
--- a/app/components/BookBuilder/Chapter/ChapterTitle.jsx
+++ b/app/components/BookBuilder/Chapter/ChapterTitle.jsx
@@ -13,7 +13,7 @@ class ChapterTitle extends React.Component {
 
   renderHasContent () {
     const { chapter, type } = this.props
-    const source = chapter.source
+    const source = chapter.source || ''
     const hasContent = source.trim().length > 0
 
     if (!hasContent) return null
diff --git a/app/components/BookBuilder/Chapter/UploadButton.jsx b/app/components/BookBuilder/Chapter/UploadButton.jsx
index c864ccb..3b233be 100644
--- a/app/components/BookBuilder/Chapter/UploadButton.jsx
+++ b/app/components/BookBuilder/Chapter/UploadButton.jsx
@@ -25,7 +25,7 @@ export class UploadButton extends React.Component {
       update(chapter)
       toggleUpload()
     }).catch((error) => {
-      console.err('INK error', error)
+      console.error('INK error', error)
       toggleUpload()
     })
   }
-- 
GitLab