mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-07-08 14:24:14 +01:00
getUUID: Return undefined if uuid is falsey
This commit is contained in:
@@ -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`,
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user