-
Notifications
You must be signed in to change notification settings - Fork 176
fix: undefined errors around billing pages #2078
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
base: main
Are you sure you want to change the base?
Conversation
a1b3c10
to
047cd06
Compare
Because of plansInfo.get(), aggregationBillingPlan was undefined for custom plans since they were not part of the billing.getPlansInfo() result. Instead, use the currentPlan that is already fetched from the parent layout.
047cd06
to
02a6ba9
Compare
When moving to a page without $organization, org is undefined and results in this "undefined (reading 'billingNextInvoiceDate')" error.
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-07-04 04:45:01 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2025-07-04 04:45:00 CET |
6c20536
to
1be8ede
Compare
ORGANIZATIONS is clearer because it refers to the resource for the dependency. So, any time the ORGANLIZATIONS (list) needs to be refreshed, the this dependency can be invalidated.
@@ -18,7 +18,7 @@ export enum Dependencies { | |||
INVOICES = 'dependency:invoices', | |||
ADDRESS = 'dependency:address', | |||
UPGRADE_PLAN = 'dependency:upgrade_plan', | |||
CREATE_ORGANIZATION = 'dependency:create_organization', | |||
ORGANIZATIONS = 'dependency:ORGANIZATIONS', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ORGANIZATIONS = 'dependency:ORGANIZATIONS', | |
ORGANIZATIONS = 'dependency:organizations', |
@@ -21,6 +21,7 @@ | |||
}); | |||
trackEvent(Submit.OrganizationBillingAddressDelete); | |||
invalidate(Dependencies.ORGANIZATION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this be invalidated anyway due to Dependencies.ORGANIZATIONS
' waterfall?
What does this PR do?
currentPlan (which came from the page's aggregationBillingPlan) can be undefined leading to an error like:
leading to a blank page:
This PR changes the page to use the currentPlan from the parent that should already be available.
Also:
Test Plan
Manual test:

Related PRs and Issues
None
Have you read the Contributing Guidelines on issues?
Yes