From 90d579bbcbca8b9df437ab37120ab45319349732 Mon Sep 17 00:00:00 2001 From: or-else Date: Sun, 28 Aug 2016 17:12:16 -0700 Subject: [PATCH] incompatible protocol changes in authentication, version bumped to 0.8 --- index.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 64ffb424..c1e650a6 100644 --- a/index.html +++ b/index.html @@ -65,7 +65,8 @@ // Make a data URL from public.photo function makeImageUrl(photo) { - return photo ? 'data:image/' + photo.type + ';base64,' + photo.data : null; + return (photo && photo.type && photo.data) ? + 'data:image/' + photo.type + ';base64,' + photo.data : null; } /* BEGIN Popup/dropdown menu */ @@ -514,7 +515,7 @@ title = "Edit Account"; break; case 'contacts': title = this.props.title; - avatar = this.props.avatar; + avatar = this.props.avatar ? this.props.avatar : true; break; case 'new-topic': title = "Start New Chat"; @@ -871,14 +872,16 @@ }, handleSearch: function(e) { e.preventDefault(); - console.log("will search for '" + this.state.search + "'"); + // Split query string by either space or comma, filter out empty strings. + var query = this.state.search.split(/[,\s]/).filter(Boolean); + console.log("will search for ", query); }, render: function() { return (
- + search