Use window.log in browser context, turn on console eslint rule

This commit is contained in:
Scott Nonnenberg 2018-07-21 12:00:08 -07:00
parent 4320b125dd
commit 5933a34a18
71 changed files with 816 additions and 559 deletions

View file

@ -81,7 +81,10 @@
if (result.name === 'OutgoingIdentityKeyError') {
this.onSafetyNumberChanged();
} else {
console.log('failed to toggle verified:', result.stack);
window.log.error(
'failed to toggle verified:',
result && result.stack ? result.stack : result
);
}
} else {
const keyError = _.some(
@ -92,7 +95,10 @@
this.onSafetyNumberChanged();
} else {
_.forEach(result.errors, error => {
console.log('failed to toggle verified:', error.stack);
window.log.error(
'failed to toggle verified:',
error && error.stack ? error.stack : error
);
});
}
}