Skip to content

fix: add null-guards to dialog close callbacks in savings, clients etc#3551

Open
Manishnemade12 wants to merge 1 commit intoopenMF:devfrom
Manishnemade12:TypeError
Open

fix: add null-guards to dialog close callbacks in savings, clients etc#3551
Manishnemade12 wants to merge 1 commit intoopenMF:devfrom
Manishnemade12:TypeError

Conversation

@Manishnemade12
Copy link
Copy Markdown

@Manishnemade12 Manishnemade12 commented Apr 30, 2026

Description

This PR resolves a silent crash (TypeError: Cannot read properties of undefined) that occurred when users dismissed confirmation dialogs across the Savings, Clients, and Loans modules by pressing Escape or clicking the backdrop.

When Angular Material's MatDialog is dismissed without a direct action button, afterClosed() emits undefined. Several components previously accessed .confirm or .delete on this undefined response without checking it first, breaking the action cascade flow.

Fix: Added a defensive if (!response) { return; } guard at the top of 13 afterClosed() callbacks across savings-account-view.component.ts, clients-view.component.ts, and loans-view.component.ts.

No external dependencies are required for this change.

Screenshots, if any

(Not applicable, silent console crash fixed)

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • If you have multiple commits please combine them into one commit by squashing them.

  • Read and understood the contribution guidelines at web-app/.github/CONTRIBUTING.md.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@Manishnemade12 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 7 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ea368274-51b7-4f43-93bc-4d27bb847852

📥 Commits

Reviewing files that changed from the base of the PR and between ad493a1 and 0dc3890.

📒 Files selected for processing (3)
  • src/app/clients/clients-view/clients-view.component.ts
  • src/app/loans/loans-view/loans-view.component.ts
  • src/app/savings/savings-account-view/savings-account-view.component.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 52 minutes and 7 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

LGTM

@Manishnemade12
Copy link
Copy Markdown
Author

LGTM

@IOhacker can you please merge this pr then

@IOhacker
Copy link
Copy Markdown
Contributor

IOhacker commented May 4, 2026

Please open a Jira ticket for this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants