Commit 487f1b52 authored by JC Brand's avatar JC Brand

core: use _.get since connection might not be set up yet

parent f21abc60
...@@ -490,7 +490,7 @@ function connect (credentials) { ...@@ -490,7 +490,7 @@ function connect (credentials) {
BOSH_WAIT BOSH_WAIT
); );
} else if (_converse.authentication === _converse.LOGIN) { } else if (_converse.authentication === _converse.LOGIN) {
const password = credentials ? credentials.password : (_converse.connection.pass || _converse.password); const password = credentials ? credentials.password : (_.get(_converse.connection, 'pass') || _converse.password);
if (!password) { if (!password) {
if (_converse.auto_login) { if (_converse.auto_login) {
throw new Error("autoLogin: If you use auto_login and "+ throw new Error("autoLogin: If you use auto_login and "+
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment