Fix strict strictNullChecks
to src/editor/*
(#10428
* Fix strict `strictNullChecks` to `src/editor/*` * Fix autoComplete creation * Fix dom regression * Remove changes
This commit is contained in:
parent
e19127f8ad
commit
e4dfb21e56
11 changed files with 85 additions and 59 deletions
|
@ -99,12 +99,15 @@ export default class AutocompleteWrapperModel {
|
|||
const text = completion.completion;
|
||||
switch (completion.type) {
|
||||
case "room":
|
||||
return [this.partCreator.roomPill(text, completionId), this.partCreator.plain(completion.suffix)];
|
||||
return [this.partCreator.roomPill(text, completionId), this.partCreator.plain(completion.suffix || "")];
|
||||
case "at-room":
|
||||
return [this.partCreator.atRoomPill(completionId), this.partCreator.plain(completion.suffix)];
|
||||
return [
|
||||
this.partCreator.atRoomPill(completionId || ""),
|
||||
this.partCreator.plain(completion.suffix || ""),
|
||||
];
|
||||
case "user":
|
||||
// Insert suffix only if the pill is the part with index 0 - we are at the start of the composer
|
||||
return this.partCreator.createMentionParts(this.partIndex === 0, text, completionId);
|
||||
return this.partCreator.createMentionParts(this.partIndex === 0, text, completionId || "");
|
||||
case "command":
|
||||
// command needs special handling for auto complete, but also renders as plain texts
|
||||
return [(this.partCreator as CommandPartCreator).command(text)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue