Remove unnecessary non-null assertion from Message#send

This commit is contained in:
Evan Hahn 2020-10-06 11:38:58 -05:00 committed by Josh Perez
parent ada70c4895
commit b9ff4f07d3

View file

@ -2148,8 +2148,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
// If we successfully sent to a user, we can remove our unregistered flag.
result.successfulIdentifiers.forEach((identifier: string) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const c = window.ConversationController.get(identifier)!;
const c = window.ConversationController.get(identifier);
if (c && c.isEverUnregistered()) {
c.setRegistered();
}