From cdd25ea45f04d247a908a7c9672d21644238a906 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 17 Jan 2020 18:27:37 -0700 Subject: [PATCH] Fix rageshake post-sourcemaps --- src/vector/rageshakesetup.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vector/rageshakesetup.js b/src/vector/rageshakesetup.js index 0369a4433..e9ce1c3b8 100644 --- a/src/vector/rageshakesetup.js +++ b/src/vector/rageshakesetup.js @@ -1,5 +1,6 @@ /* Copyright 2018 New Vector Ltd +Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,6 +28,7 @@ limitations under the License. import * as rageshake from "matrix-react-sdk/src/rageshake/rageshake"; import SdkConfig from "matrix-react-sdk/src/SdkConfig"; +import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake"; function initRageshake() { rageshake.init().then(() => { @@ -54,15 +56,13 @@ global.mxSendRageshake = function(text, withLogs) { console.error("Cannot send a rageshake without a message - please tell us what went wrong"); return; } - require(['matrix-react-sdk/src/rageshake/submit-rageshake'], (s) => { - s(SdkConfig.get().bug_report_endpoint_url, { - userText: text, - sendLogs: withLogs, - progressCallback: console.log.bind(console), - }).then(() => { - console.log("Bug report sent!"); - }, (err) => { - console.error(err); - }); + sendBugReport(SdkConfig.get().bug_report_endpoint_url, { + userText: text, + sendLogs: withLogs, + progressCallback: console.log.bind(console), + }).then(() => { + console.log("Bug report sent!"); + }, (err) => { + console.error(err); }); };