Skip to content

Conversation

@SandipBajracharya
Copy link
Collaborator

Changes

  • early return null value if no products or prices are found
  • add optional chaining and ternary operations wherever necessary

Testing Criteria

If no products in workspace, then gives Create Product option

image

- [x] early return null value if no products or prices are found
- [x] add optional chaining and ternary operations wherever necessary
@linear
Copy link

linear bot commented Dec 23, 2025

@vercel
Copy link

vercel bot commented Dec 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
xero-integration Ready Ready Preview, Comment Dec 23, 2025 9:27am

@supabase
Copy link

supabase bot commented Dec 23, 2025

This pull request has been ignored for the connected project pkdwtcdqcefmlgxmcwmc because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@SandipBajracharya SandipBajracharya merged commit e4eae95 into main Dec 23, 2025
5 checks passed
Comment on lines +171 to +172

if (!allPricesResponse.data) return null
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are returning a hashmap of priceId in key, price in value - we should keep our typing semantic and return {} instead if there are no prices.

That way we only have to change 1 line in this PR.

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.

3 participants