Fix some more lint errors
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
954d49f22e
commit
752d816780
3 changed files with 8 additions and 11 deletions
|
@ -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 <span className='translated-string' data-orig-string={text}>{substituted}</span>;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return substituted;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue