Skip to content

Commit cdd25ea

Browse files
committed
Fix rageshake post-sourcemaps
1 parent e3b4f18 commit cdd25ea

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎src/vector/rageshakesetup.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
Copyright 2018 New Vector Ltd
3+
Copyright 2020 The Matrix.org Foundation C.I.C.
34
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.
@@ -27,6 +28,7 @@ limitations under the License.
2728

2829
import * as rageshake from "matrix-react-sdk/src/rageshake/rageshake";
2930
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
31+
import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake";
3032

3133
function initRageshake() {
3234
rageshake.init().then(() => {
@@ -54,15 +56,13 @@ global.mxSendRageshake = function(text, withLogs) {
5456
console.error("Cannot send a rageshake without a message - please tell us what went wrong");
5557
return;
5658
}
57-
require(['matrix-react-sdk/src/rageshake/submit-rageshake'], (s) => {
58-
s(SdkConfig.get().bug_report_endpoint_url, {
59-
userText: text,
60-
sendLogs: withLogs,
61-
progressCallback: console.log.bind(console),
62-
}).then(() => {
63-
console.log("Bug report sent!");
64-
}, (err) => {
65-
console.error(err);
66-
});
59+
sendBugReport(SdkConfig.get().bug_report_endpoint_url, {
60+
userText: text,
61+
sendLogs: withLogs,
62+
progressCallback: console.log.bind(console),
63+
}).then(() => {
64+
console.log("Bug report sent!");
65+
}, (err) => {
66+
console.error(err);
6767
});
6868
};

0 commit comments

Comments
 (0)