Skip to content

Commit

Permalink
Fix Settings window for linking stage
Browse files Browse the repository at this point in the history
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
  • Loading branch information
automated-signal and indutny-signal committed Feb 22, 2024
1 parent bf405a9 commit a1c49aa
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ts/util/createIPCEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,17 @@ export function createIPCEvents(

getDeviceName: () => window.textsecure.storage.user.getDeviceName(),
getPhoneNumber: () => {
const e164 = window.textsecure.storage.user.getNumber();
const parsedNumber = instance.parse(e164);
return instance.format(parsedNumber, PhoneNumberFormat.INTERNATIONAL);
try {
const e164 = window.textsecure.storage.user.getNumber();
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: () => {
Expand Down

0 comments on commit a1c49aa

Please sign in to comment.