Update Backbone types: attributes is T - and fix failing type checks

This commit is contained in:
Scott Nonnenberg 2023-01-05 13:58:13 -08:00 committed by GitHub
parent c65a7d0a14
commit b8234765bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 24 deletions

View file

@ -1686,7 +1686,7 @@ export class ConversationModel extends window.Backbone
const { attributes } = message;
const { schemaVersion } = attributes;
if (schemaVersion < Message.VERSION_NEEDED_FOR_DISPLAY) {
if ((schemaVersion || 0) < Message.VERSION_NEEDED_FOR_DISPLAY) {
// Yep, we really do want to wait for each of these
// eslint-disable-next-line no-await-in-loop
const upgradedMessage = await upgradeMessageSchema(attributes);