Skip to content

Commit 373f850

Browse files
committed
Safely bind console.log and default withLogs to true
1 parent ac34ca1 commit 373f850

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vector/rageshakesetup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ function initRageshake() {
4747
initRageshake();
4848

4949
global.mxSendRageshake = function(text, withLogs) {
50+
if (withLogs === undefined) withLogs = true;
5051
require(['matrix-react-sdk/lib/rageshake/submit-rageshake'], (s) => {
5152
s(SdkConfig.get().bug_report_endpoint_url, {
5253
userText: text,
5354
sendLogs: withLogs,
54-
progressCallback: console.log,
55+
progressCallback: console.log.bind(console),
5556
}).then(() => {
5657
console.log("Bug report sent!");
5758
}, (err) => {

0 commit comments

Comments
 (0)