From 40cccfdfa907b07b6c8eff7fdce46fa64ae896b1 Mon Sep 17 00:00:00 2001 From: or-else Date: Wed, 24 May 2017 18:23:26 -0700 Subject: [PATCH] added error handling for hello() --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5eea8d6d..455ef325 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ and [icons](https://google.github.io/material-design-icons/#icon-font-for-the-we This is work in progress. Bugs are expected. The app was tested in the latest Chrome & Firefox only. -Try it at http://api.tinode.co/x/example-react-js/. Login as one of `alice`, `bob`, `carol`, `dave`, `frank`. -Password is `123`, e.g. login for `alice` is `alice123`. +Try it live at http://api.tinode.co/x/example-react-js/. Login as one of `alice`, `bob`, `carol`, `dave`, `frank`. +Password is `123`, e.g. password for `alice` is `alice123`. License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/index.html b/index.html index 38c1c020..776fbc99 100644 --- a/index.html +++ b/index.html @@ -1476,14 +1476,14 @@ }); } }, - handleDisconnect: function() { + handleDisconnect: function(err) { this.setState({ sidePanelSelected: 'login', sidePanelTitle: null, sidePanelAvatar: null, dialogSelected: null, loggedIn: false, - errorText: 'disconnected', + errorText: err && err.message ? err.message : 'disconnected', topicSelected: '', loginDisabled: false, subscriptions: {},