Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint Fix: Fix for new Phone numbers schema change #861

Merged
merged 12 commits into from
Jan 25, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
return {
id: phoneNumber.id,
primary: phoneNumber.primary,
number: phoneNumber.number,
number: phoneNumber?.number,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will help. I believe it's number that will be null, not phoneNumber. And if phoneNumber is null, all the other property access calls with throw an exception too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about this one, I added it just in case. I want to test with a Null number. I'll do that tomorrow

historic: phoneNumber.historic,
location: phoneNumber.location,
destroy: false,
Expand Down Expand Up @@ -482,9 +482,9 @@

interface attributes {
id: string;
greeting: any;

Check warning on line 485 in src/components/Contacts/ContactDetails/ContactDetailsTab/People/Items/PersonModal/PersonModal.tsx

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
envelopeGreeting: any;

Check warning on line 486 in src/components/Contacts/ContactDetails/ContactDetailsTab/People/Items/PersonModal/PersonModal.tsx

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
name: any;

Check warning on line 487 in src/components/Contacts/ContactDetails/ContactDetailsTab/People/Items/PersonModal/PersonModal.tsx

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
primaryPersonId?: string;
}
const attributes: attributes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const FixPhoneNumbers: React.FC<Props> = ({ accountListId }: Props) => {
primary: phoneNumber.primary,
updatedAt: phoneNumber.updatedAt,
source: phoneNumber.source,
number: phoneNumber.number,
number: phoneNumber.number || '',
}),
),
toDelete: [],
Expand Down
Loading