If no bug_report_endpoint_url, hide rageshaking from the App
parent
df5cb15cf9
commit
40813a6b33
|
@ -51,12 +51,18 @@ export function initRageshake() {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.mxSendRageshake = function(text: string, withLogs?: boolean) {
|
window.mxSendRageshake = function(text: string, withLogs?: boolean) {
|
||||||
|
const url = SdkConfig.get().bug_report_endpoint_url;
|
||||||
|
if (!url) {
|
||||||
|
console.error("Cannot send a rageshake - no bug_report_endpoint_url configured");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (withLogs === undefined) withLogs = true;
|
if (withLogs === undefined) withLogs = true;
|
||||||
if (!text || !text.trim()) {
|
if (!text || !text.trim()) {
|
||||||
console.error("Cannot send a rageshake without a message - please tell us what went wrong");
|
console.error("Cannot send a rageshake without a message - please tell us what went wrong");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendBugReport(SdkConfig.get().bug_report_endpoint_url, {
|
sendBugReport(url, {
|
||||||
userText: text,
|
userText: text,
|
||||||
sendLogs: withLogs,
|
sendLogs: withLogs,
|
||||||
progressCallback: console.log.bind(console),
|
progressCallback: console.log.bind(console),
|
||||||
|
|
Loading…
Reference in New Issue