Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 881307e

Browse files
authored
Fix bad ternary statement in autocomplete user pill insertions (#7977)
1 parent a58b1e9 commit 881307e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/editor/parts.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,10 @@ export class PartCreator {
651651
userId: string,
652652
): [UserPillPart, PlainPart] {
653653
const pill = this.userPill(displayName, userId);
654-
const postfix = this.plain(
655-
insertTrailingCharacter &&
656-
(SettingsStore.getValue("MessageComposerInput.insertTrailingComma") ? ": " : " "),
657-
);
654+
if (!SettingsStore.getValue("MessageComposerInput.insertTrailingComma")) {
655+
insertTrailingCharacter = false;
656+
}
657+
const postfix = this.plain(insertTrailingCharacter ? ": " : " ");
658658
return [pill, postfix];
659659
}
660660
}

0 commit comments

Comments
 (0)