diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index ae9a618d60..d06e6858bc 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1427,9 +1427,8 @@ Commands.forEach((cmd) => { }); export function parseCommandString(input: string): { cmd?: string; args?: string } { - // trim any trailing whitespace, as it can confuse the parser for - // IRC-style commands - input = input.replace(/\s+$/, ""); + // trim any trailing whitespace, as it can confuse the parser for IRC-style commands + input = input.trimEnd(); if (input[0] !== "/") return {}; // not a command const bits = input.match(/^(\S+?)(?:[ \n]+((.|\n)*))?$/); diff --git a/src/components/structures/LegacyCallEventGrouper.ts b/src/components/structures/LegacyCallEventGrouper.ts index ab15ce5b64..2d51b4ee18 100644 --- a/src/components/structures/LegacyCallEventGrouper.ts +++ b/src/components/structures/LegacyCallEventGrouper.ts @@ -103,7 +103,7 @@ export default class LegacyCallEventGrouper extends EventEmitter { public get isVoice(): boolean | undefined { const invite = this.invite; - if (!invite) return; + if (!invite) return undefined; // FIXME: Find a better way to determine this from the event? if (invite.getContent()?.offer?.sdp?.indexOf("m=video") !== -1) return false; diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index e637e3081e..03d2645996 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -1228,6 +1228,8 @@ export default class InviteDialog extends React.PureComponent ReactNode; } -const Map: React.FC = ({ +const MapComponent: React.FC = ({ bounds, centerGeoUri, children, @@ -188,4 +188,4 @@ const Map: React.FC = ({ ); }; -export default Map; +export default MapComponent;