Skip to content

fix(lit-form): initialize api before adding controller#1254

Merged
crutchcorn merged 3 commits intoTanStack:mainfrom
Avocher:main
Mar 20, 2025
Merged

fix(lit-form): initialize api before adding controller#1254
crutchcorn merged 3 commits intoTanStack:mainfrom
Avocher:main

Conversation

@Avocher
Copy link
Copy Markdown
Contributor

@Avocher Avocher commented Mar 8, 2025

The following fix allows for lazily instancing the TanStackFormController. Before it would crash if the element had already rendered because addController would immediately call the hostConnected callback and crash because this.#api would be undefined.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 20, 2025

View your CI Pipeline Execution ↗ for commit d3edfd2.

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 54s View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-20 07:08:25 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 20, 2025

@crutchcorn
Copy link
Copy Markdown
Member

I'm more than happy to merge with these tests passing, but could you do a follow-up PR to add a test showcasing this? Would help us prevent future breakage - thanks!

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.85%. Comparing base (b32b010) to head (d3edfd2).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1254      +/-   ##
==========================================
- Coverage   88.86%   82.85%   -6.01%     
==========================================
  Files          28        1      -27     
  Lines        1275       35    -1240     
  Branches      333        5     -328     
==========================================
- Hits         1133       29    -1104     
+ Misses        127        5     -122     
+ Partials       15        1      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@crutchcorn crutchcorn merged commit caf2837 into TanStack:main Mar 20, 2025
5 of 6 checks passed
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