1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Fix rageshake submission after build changes

We aren't able to depend on `require` in this context anymore.

Fixes https://github.com/vector-im/riot-web/issues/11938
This commit is contained in:
J. Ryan Stinnett
2020-01-20 12:06:43 +00:00
parent d35788476a
commit 15749621a5

View File

@@ -23,6 +23,7 @@ import * as sdk from '../../../index';
import SdkConfig from '../../../SdkConfig'; import SdkConfig from '../../../SdkConfig';
import Modal from '../../../Modal'; import Modal from '../../../Modal';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import sendBugReport from '../../../rageshake/submit-rageshake';
export default class BugReportDialog extends React.Component { export default class BugReportDialog extends React.Component {
constructor(props) { constructor(props) {
@@ -67,8 +68,7 @@ export default class BugReportDialog extends React.Component {
this.setState({ busy: true, progress: null, err: null }); this.setState({ busy: true, progress: null, err: null });
this._sendProgressCallback(_t("Preparing to send logs")); this._sendProgressCallback(_t("Preparing to send logs"));
require(['../../../rageshake/submit-rageshake'], (s) => { sendBugReport(SdkConfig.get().bug_report_endpoint_url, {
s(SdkConfig.get().bug_report_endpoint_url, {
userText, userText,
sendLogs: true, sendLogs: true,
progressCallback: this._sendProgressCallback, progressCallback: this._sendProgressCallback,
@@ -93,7 +93,6 @@ export default class BugReportDialog extends React.Component {
}); });
} }
}); });
});
} }
_onTextChange(ev) { _onTextChange(ev) {