Fix Settings window for linking stage

This commit is contained in:
Fedor Indutny 2024-02-21 00:03:54 -08:00 committed by GitHub
parent 604563a3b4
commit fbefbcea73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -227,9 +227,17 @@ export function createIPCEvents(
getDeviceName: () => window.textsecure.storage.user.getDeviceName(), getDeviceName: () => window.textsecure.storage.user.getDeviceName(),
getPhoneNumber: () => { getPhoneNumber: () => {
const e164 = window.textsecure.storage.user.getNumber(); try {
const parsedNumber = instance.parse(e164); const e164 = window.textsecure.storage.user.getNumber();
return instance.format(parsedNumber, PhoneNumberFormat.INTERNATIONAL); const parsedNumber = instance.parse(e164);
return instance.format(parsedNumber, PhoneNumberFormat.INTERNATIONAL);
} catch (error) {
log.warn(
'IPC.getPhoneNumber: failed to parse our E164',
Errors.toLogFormat(error)
);
return '';
}
}, },
getZoomFactor: () => { getZoomFactor: () => {