mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-24 00:38:31 +08:00
es lint fixes
This commit is contained in:
parent
e5cbf58edc
commit
97eecfdc54
@ -72,7 +72,7 @@ export class PosthogSpanProcessor implements SpanProcessor {
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch (e) {
|
||||
logger.warn("Invalid prev call data", data);
|
||||
logger.warn("Invalid prev call data", data, "error:", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] {
|
||||
|
||||
useEffect(() => {
|
||||
function updateRooms(): void {
|
||||
// We want to show all rooms that historically had a call and which we are (can become) part of.
|
||||
// We want to show all rooms that historically had a call and which we are (or can become) part of.
|
||||
const rooms = client
|
||||
.getRooms()
|
||||
.filter(roomHasCallMembershipEvents)
|
||||
@ -142,7 +142,6 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] {
|
||||
const sortedRooms = sortRooms(client, rooms);
|
||||
const items = sortedRooms.map((room) => {
|
||||
const session = client.matrixRTC.getRoomSession(room);
|
||||
session.memberships;
|
||||
return {
|
||||
roomAlias: room.getCanonicalAlias() ?? undefined,
|
||||
roomName: room.name,
|
||||
|
@ -115,6 +115,7 @@ async function doConnect(
|
||||
await connectAndPublish(livekitRoom, sfuConfig, preCreatedAudioTrack, []);
|
||||
} catch (e) {
|
||||
preCreatedAudioTrack?.stop();
|
||||
logger.warn("Stopped precreated audio tracks.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ export abstract class OTelCallAbstractMediaStreamSpan {
|
||||
});
|
||||
}
|
||||
|
||||
public abstract update(data: Object): void;
|
||||
public abstract update(data: object): void;
|
||||
|
||||
public end(): void {
|
||||
this.trackSpans.forEach((tSpan) => {
|
||||
|
@ -74,7 +74,7 @@ export class ObjectFlattener {
|
||||
}
|
||||
|
||||
public static flattenObjectRecursive(
|
||||
obj: Object,
|
||||
obj: object,
|
||||
flatObject: Attributes,
|
||||
prefix: string,
|
||||
depth: number,
|
||||
|
@ -505,7 +505,9 @@ function tryInitStorage(): Promise<void> {
|
||||
let indexedDB;
|
||||
try {
|
||||
indexedDB = window.indexedDB;
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
logger.warn("Could not get indexDB from window.", e);
|
||||
}
|
||||
|
||||
if (indexedDB) {
|
||||
global.mx_rage_store = new IndexedDBLogStore(
|
||||
|
@ -30,7 +30,10 @@ export class Setting<T> {
|
||||
try {
|
||||
initialValue = JSON.parse(storedValue);
|
||||
} catch (e) {
|
||||
logger.warn(`Invalid value stored for setting ${key}: ${storedValue}`);
|
||||
logger.warn(
|
||||
`Invalid value stored for setting ${key}: ${storedValue}.`,
|
||||
e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,9 @@ export function useSubmitRageshake(): {
|
||||
try {
|
||||
// MDN claims broad support across browsers
|
||||
touchInput = String(window.matchMedia("(pointer: coarse)").matches);
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
logger.warn("Could not get coarse pointer for rageshake submit.", e);
|
||||
}
|
||||
|
||||
let description = opts.rageshakeRequestId
|
||||
? `Rageshake ${opts.rageshakeRequestId}`
|
||||
@ -216,7 +218,9 @@ export function useSubmitRageshake(): {
|
||||
"storageManager_persisted",
|
||||
String(await navigator.storage.persisted()),
|
||||
);
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
logger.warn("coulr not get navigator peristed storage", e);
|
||||
}
|
||||
} else if (document.hasStorageAccess) {
|
||||
// Safari
|
||||
try {
|
||||
@ -224,7 +228,9 @@ export function useSubmitRageshake(): {
|
||||
"storageManager_persisted",
|
||||
String(await document.hasStorageAccess()),
|
||||
);
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
logger.warn("could not get storage access", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (navigator.storage && navigator.storage.estimate) {
|
||||
@ -244,7 +250,9 @@ export function useSubmitRageshake(): {
|
||||
);
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
logger.warn("could not obatain storage estimate", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.sendLogs) {
|
||||
|
@ -86,7 +86,9 @@ export async function initClient(
|
||||
let indexedDB: IDBFactory | undefined;
|
||||
try {
|
||||
indexedDB = window.indexedDB;
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
logger.warn("Could not get indexDB from window.", e);
|
||||
}
|
||||
|
||||
// options we always pass to the client (stuff that we need in order to work)
|
||||
const baseOpts = {
|
||||
|
Loading…
Reference in New Issue
Block a user