diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index d94cff0dd4..3322a0c3e2 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -3497,7 +3497,7 @@ export class ConversationModel extends window.Backbone getUuid(): UUID | undefined { try { const value = this.get('uuid'); - return value && new UUID(value); + return value ? new UUID(value) : undefined; } catch (err) { log.warn( `getUuid(): failed to obtain conversation(${this.id}) uuid due to`, diff --git a/ts/textsecure/storage/User.ts b/ts/textsecure/storage/User.ts index a1050b7ed8..cff2b6a1b3 100644 --- a/ts/textsecure/storage/User.ts +++ b/ts/textsecure/storage/User.ts @@ -71,7 +71,7 @@ export class User { `Unsupported uuid kind: ${uuidKind}` ); const uuid = this.storage.get('uuid_id'); - if (uuid === undefined) return undefined; + if (!uuid) return undefined; return new UUID(Helpers.unencodeNumber(uuid.toLowerCase())[0]); }