Skip to content

Fix undefined errors #1878

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix undefined errors #1878

wants to merge 2 commits into from

Conversation

stnguyen90
Copy link
Contributor

What does this PR do?

  • fix(billing): fix error when currentPlan or organization is undefined
  • fix(support): fix upgrade URL for free organization

Test Plan

Billing

From the /account page and with a Free org, clicked the Support button > Get Premium support button and verified the change plan page loaded successfully.

Support

From the /account page with an account with only a Pro org, clicked the Support button and confirmed the menu appeared:

Screenshot 2025-05-22 at 16 39 04

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Even though upgradeURL isn't used when there are no free orgs, this line
is still evaluated and will throw an error because freeOrganization
is undefined. This commit adds a null check to prevent this error.
When going from /account to /organization/[organization]/change-plan,
the currentPlan and organization variables may not be defined as the
states are still being set. This change ensures an error isn't thrown
so that the states can update fully.
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented May 22, 2025

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2025-05-22 23:44:52 CET

@stnguyen90 stnguyen90 requested a review from ItzNotABug May 22, 2025 23:41
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented May 22, 2025

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2025-05-22 23:44:48 CET

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