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

fix(condo): DOMA-10760 fix ticket invoices update #5547

Merged

Conversation

nomerdvadcatpyat
Copy link
Member

No description provided.

@nomerdvadcatpyat nomerdvadcatpyat added 👶 small Easy to review changes up to 50 lines of code ✋🙂 Review please Comments are resolved, take a look, please labels Nov 27, 2024
Copy link

sonarcloud bot commented Nov 27, 2024

@@ -113,7 +114,7 @@ export const InvoiceRowsTable: React.FC<InvoiceRowsTableProps> = ({ invoice }) =
const ContractPriceMessage = intl.formatMessage({ id: 'pages.condo.marketplace.invoice.form.contractPrice' }).toLowerCase()

const currencyCode = get(invoice, 'currencyCode') || DEFAULT_INVOICE_CURRENCY_CODE
const rows = useMemo(() => get(invoice, 'rows'), [invoice])
const rows = useMemo(() => get(invoice, 'rows') || [], [invoice])
Copy link
Member

Choose a reason for hiding this comment

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

Or another solution if you're using get

Suggested change
const rows = useMemo(() => get(invoice, 'rows') || [], [invoice])
const rows = useMemo(() => get(invoice, 'rows', []), [invoice])

@nomerdvadcatpyat nomerdvadcatpyat merged commit 6c6468f into main Nov 27, 2024
28 checks passed
@nomerdvadcatpyat nomerdvadcatpyat deleted the fix/condo/DOMA-10760/fix-ticket-invoices-update branch November 27, 2024 06:44
Copy link
Member

@sitozzz sitozzz left a comment

Choose a reason for hiding this comment

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

Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✋🙂 Review please Comments are resolved, take a look, please 👶 small Easy to review changes up to 50 lines of code
Development

Successfully merging this pull request may close these issues.

4 participants