diff options
author | sualko <klaus@jsxc.org> | 2017-11-14 15:04:03 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2017-11-14 15:04:03 +0300 |
commit | 28d85a5b2f42334e24ad0b2bfd47b66bd28f6e29 (patch) | |
tree | a3c5ea65c1a52b063b608f2023bc731f33a73039 /js | |
parent | b978d717001d1646ba064d41539ce26c94c9f354 (diff) |
fix type error related to internal backend (fix jsxc/jsxc#640)
Diffstat (limited to 'js')
-rw-r--r-- | js/ojsxc.js | 8 |
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') |