mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Safely bind console.log and default withLogs to true
This commit is contained in:
parent
ac34ca11df
commit
373f850002
@ -47,11 +47,12 @@ function initRageshake() {
|
||||
initRageshake();
|
||||
|
||||
global.mxSendRageshake = function(text, withLogs) {
|
||||
if (withLogs === undefined) withLogs = true;
|
||||
require(['matrix-react-sdk/lib/rageshake/submit-rageshake'], (s) => {
|
||||
s(SdkConfig.get().bug_report_endpoint_url, {
|
||||
userText: text,
|
||||
sendLogs: withLogs,
|
||||
progressCallback: console.log,
|
||||
progressCallback: console.log.bind(console),
|
||||
}).then(() => {
|
||||
console.log("Bug report sent!");
|
||||
}, (err) => {
|
||||
|
Loading…
Reference in New Issue
Block a user