Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2017-11-14 15:04:03 +0300
committersualko <klaus@jsxc.org>2017-11-14 15:04:03 +0300
commit28d85a5b2f42334e24ad0b2bfd47b66bd28f6e29 (patch)
treea3c5ea65c1a52b063b608f2023bc731f33a73039 /js
parentb978d717001d1646ba064d41539ce26c94c9f354 (diff)
fix type error related to internal backend (fix jsxc/jsxc#640)
Diffstat (limited to 'js')
-rw-r--r--js/ojsxc.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/js/ojsxc.js b/js/ojsxc.js
index b4eecd8..063624a 100644
--- a/js/ojsxc.js
+++ b/js/ojsxc.js
@@ -403,7 +403,13 @@
});
function startInternalBackend() {
- jsxc.bid = OC.currentUser.toLowerCase() + '@' + window.location.host;
+ var currentUser = OC.currentUser;
+
+ if (!currentUser) {
+ return;
+ }
+
+ jsxc.bid = currentUser.toLowerCase() + '@' + window.location.host;
jsxc.options.set('xmpp', {
url: OC.generateUrl('apps/ojsxc/http-bind')