diff --git a/src/languageHandler.js b/src/languageHandler.js index 4e24c04d36..8735150d20 100644 --- a/src/languageHandler.js +++ b/src/languageHandler.js @@ -97,19 +97,17 @@ export function _t(text, variables, tags) { // The translation returns text so there's no XSS vector here (no unsafe HTML, no code execution) const translated = safeCounterpartTranslate(text, args); - let substituted = substitute(translated, variables, tags); + const substituted = substitute(translated, variables, tags); // For development/testing purposes it is useful to also output the original string // Don't do that for release versions if (ANNOTATE_STRINGS) { if (typeof substituted === 'string') { - return `@@${text}##${substituted}@@` - } - else { + return `@@${text}##${substituted}@@`; + } else { return {substituted}; } - } - else { + } else { return substituted; } } diff --git a/src/rageshake/submit-rageshake.js b/src/rageshake/submit-rageshake.js index 086cf25d00..a93997a794 100644 --- a/src/rageshake/submit-rageshake.js +++ b/src/rageshake/submit-rageshake.js @@ -22,7 +22,7 @@ import MatrixClientPeg from '../MatrixClientPeg'; import PlatformPeg from '../PlatformPeg'; import { _t } from '../languageHandler'; -import rageshake from './rageshake' +import rageshake from './rageshake'; // polyfill textencoder if necessary @@ -59,8 +59,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) { let version = "UNKNOWN"; try { version = await PlatformPeg.get().getAppVersion(); - } - catch (err) {} // PlatformPeg already logs this. + } catch (err) {} // PlatformPeg already logs this. let userAgent = "UNKNOWN"; if (window.navigator && window.navigator.userAgent) { @@ -85,7 +84,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) { if (opts.sendLogs) { progressCallback(_t("Collecting logs")); const logs = await rageshake.getLogsForReport(); - for (let entry of logs) { + for (const entry of logs) { // encode as UTF-8 const buf = new TextEncoder().encode(entry.lines); diff --git a/src/utils/DMRoomMap.js b/src/utils/DMRoomMap.js index bea6e702fa..bb5e4d706b 100644 --- a/src/utils/DMRoomMap.js +++ b/src/utils/DMRoomMap.js @@ -104,7 +104,7 @@ export default class DMRoomMap { .some((ids) => ids.roomId === roomId); }); guessedUserIdsThatChanged.forEach(({userId, roomId}) => { - let roomIds = userToRooms[userId]; + const roomIds = userToRooms[userId]; if (!roomIds) { userToRooms[userId] = [roomId]; } else {