Commit 75301d28 authored by JC Brand's avatar JC Brand

Bugfix. `info called on object that doesn't implement interface Console`

parent 016bca74
...@@ -120,11 +120,11 @@ ...@@ -120,11 +120,11 @@
if (message instanceof Error) { if (message instanceof Error) {
message = message.stack; message = message.stack;
} }
const logger = _.assignIn({ const logger = _.assign({
'debug': console.log || _.noop, 'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
'error': console.log || _.noop, 'error': _.get(console, 'log') ? console.log.bind(console) : _.noop,
'info': console.log || _.noop, 'info': _.get(console, 'log') ? console.log.bind(console) : _.noop,
'warn': console.log || _.noop, 'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
}, console); }, console);
if (level === Strophe.LogLevel.ERROR) { if (level === Strophe.LogLevel.ERROR) {
if (_converse.debug) { if (_converse.debug) {
...@@ -1658,7 +1658,7 @@ ...@@ -1658,7 +1658,7 @@
this.connection.restore(this.jid, this.onConnectStatusChanged); this.connection.restore(this.jid, this.onConnectStatusChanged);
return true; return true;
} catch (e) { } catch (e) {
this.log( _converse.log(
"Could not restore session for jid: "+ "Could not restore session for jid: "+
this.jid+" Error message: "+e.message); this.jid+" Error message: "+e.message);
this.clearSession(); // If there's a roster, we want to clear it (see #555) this.clearSession(); // If there's a roster, we want to clear it (see #555)
......
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
const URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b/g; const URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b/g;
const logger = _.assignIn({ const logger = _.assign({
'debug': console.log || _.noop, 'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
'error': console.log || _.noop, 'error': _.get(console, 'log') ? console.log.bind(console) : _.noop,
'info': console.log || _.noop, 'info': _.get(console, 'log') ? console.log.bind(console) : _.noop,
'warn': console.log || _.noop, 'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
}, console); }, console);
var afterAnimationEnd = function (el, callback) { var afterAnimationEnd = function (el, callback) {
......
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