Apply strictNullChecks
to src/utils/pillify.tsx
(#10456)
* apply strictNullChecks to src/utils/pillify.tsx * include change to utility * apply strictNullChecks to src/utils/permalinks
This commit is contained in:
parent
cd700e20fc
commit
ae50eee135
3 changed files with 10 additions and 10 deletions
|
@ -37,8 +37,8 @@ export enum PillType {
|
|||
EventInOtherRoom = "TYPE_EVENT_IN_OTHER_ROOM",
|
||||
}
|
||||
|
||||
export const pillRoomNotifPos = (text: string): number => {
|
||||
return text.indexOf("@room");
|
||||
export const pillRoomNotifPos = (text: string | null): number => {
|
||||
return text?.indexOf("@room") ?? -1;
|
||||
};
|
||||
|
||||
export const pillRoomNotifLen = (): number => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue