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

Null check #1669

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Null check #1669

merged 3 commits into from
Jan 27, 2025

Conversation

mrkoreye
Copy link
Collaborator

@mrkoreye mrkoreye commented Jan 27, 2025

Description

Adds null check for property values

https://www.loom.com/share/be7a4cd800614433aaa82b7675b87bd8

https://builder-io.atlassian.net/browse/ENG-8150

  • format the codebase: from the root, run yarn fmt:prettier.
  • update all snapshots (in core & CLI): from the root, run yarn test:update
  • add Changeset entry: from the root, run yarn g:changeset and follow the CLI instructions. Alternatively, use the Changeset Github Bot to create the file.

@mrkoreye mrkoreye requested a review from samijaber as a code owner January 27, 2025 19:52
Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: 058b1a7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@builder.io/mitosis Patch
@builder.io/mitosis-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

nx-cloud bot commented Jan 27, 2025

View your CI Pipeline Execution ↗ for commit 058b1a7.

Command Status Duration Result
nx run-many --target test ✅ Succeeded 4m 20s View ↗
nx e2e @builder.io/e2e-app ✅ Succeeded 2m 7s View ↗
nx build @builder.io/mitosis-site ✅ Succeeded 1s View ↗
nx run-many --target build --exclude @builder.i... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-27 20:50:45 UTC

Copy link

cloudflare-workers-and-pages bot commented Jan 27, 2025

Deploying mitosis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 058b1a7
Status: ✅  Deploy successful!
Preview URL: https://327340d4.mitosis-9uh.pages.dev
Branch Preview URL: https://korey-null-check.mitosis-9uh.pages.dev

View logs

if (typeof linkUrl === 'object' && linkUrl['@type'] === '@builder.io/core:LocalizedValue') {
if (
typeof linkUrl === 'object' &&
linkUrl !== null &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird that we need this since there's a if (linkUrl) right above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This particular null check might not be 100% necessary, but I wanted to keep it consistent with the other spots where we check for localized values

.changeset/itchy-chairs-collect.md Outdated Show resolved Hide resolved
@mrkoreye mrkoreye enabled auto-merge (squash) January 27, 2025 20:46
@mrkoreye mrkoreye merged commit 0c493b2 into main Jan 27, 2025
15 checks passed
@mrkoreye mrkoreye deleted the korey/null-check branch January 27, 2025 20:50
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