Make SonarCloud happier about our code quality (#10630)
parent
9c277d6b02
commit
568ec77208
|
@ -1427,9 +1427,8 @@ Commands.forEach((cmd) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
export function parseCommandString(input: string): { cmd?: string; args?: string } {
|
export function parseCommandString(input: string): { cmd?: string; args?: string } {
|
||||||
// trim any trailing whitespace, as it can confuse the parser for
|
// trim any trailing whitespace, as it can confuse the parser for IRC-style commands
|
||||||
// IRC-style commands
|
input = input.trimEnd();
|
||||||
input = input.replace(/\s+$/, "");
|
|
||||||
if (input[0] !== "/") return {}; // not a command
|
if (input[0] !== "/") return {}; // not a command
|
||||||
|
|
||||||
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/);
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default class LegacyCallEventGrouper extends EventEmitter {
|
||||||
|
|
||||||
public get isVoice(): boolean | undefined {
|
public get isVoice(): boolean | undefined {
|
||||||
const invite = this.invite;
|
const invite = this.invite;
|
||||||
if (!invite) return;
|
if (!invite) return undefined;
|
||||||
|
|
||||||
// FIXME: Find a better way to determine this from the event?
|
// FIXME: Find a better way to determine this from the event?
|
||||||
if (invite.getContent()?.offer?.sdp?.indexOf("m=video") !== -1) return false;
|
if (invite.getContent()?.offer?.sdp?.indexOf("m=video") !== -1) return false;
|
||||||
|
|
|
@ -1228,6 +1228,8 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
|
||||||
switch (this.props.kind) {
|
switch (this.props.kind) {
|
||||||
case InviteKind.Dm:
|
case InviteKind.Dm:
|
||||||
return "StartChat";
|
return "StartChat";
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ interface MapProps {
|
||||||
children?: (renderProps: { map: maplibregl.Map }) => ReactNode;
|
children?: (renderProps: { map: maplibregl.Map }) => ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Map: React.FC<MapProps> = ({
|
const MapComponent: React.FC<MapProps> = ({
|
||||||
bounds,
|
bounds,
|
||||||
centerGeoUri,
|
centerGeoUri,
|
||||||
children,
|
children,
|
||||||
|
@ -188,4 +188,4 @@ const Map: React.FC<MapProps> = ({
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Map;
|
export default MapComponent;
|
||||||
|
|
Loading…
Reference in New Issue