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

Fix "Cannot read properties of undefined (reading 'forwardRef')" error on certain bundler setups #6569

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Mar 27, 2025

PR-Codex overview

This PR addresses a bug related to reading properties of undefined in certain bundler setups by modifying the MediaRenderer component and its associated players.

Detailed summary

  • Changed import of React to type-only import.
  • Updated MediaRenderer to use forwardRef correctly.
  • Refactored return statements for better readability and consistency.
  • Ensured proper handling of various media types (audio, video, image, etc.) with updated conditional logic.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

linear bot commented Mar 27, 2025

Copy link

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 5:20pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 5:20pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 5:20pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 5:20pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 5:20pm

Copy link

changeset-bot bot commented Mar 27, 2025

🦋 Changeset detected

Latest commit: 43af4fc

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

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter 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

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Mar 27, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MananTank MananTank marked this pull request as ready for review March 27, 2025 17:04
@MananTank MananTank requested review from a team as code owners March 27, 2025 17:04
@MananTank MananTank changed the title [TOOL-3730] Dashboard: Fix forwardRef error with certain bundler setup Fix "Cannot read properties of undefined (reading 'forwardRef')" error Mar 27, 2025
@MananTank
Copy link
Member Author

Fixes #6481

@MananTank MananTank changed the title Fix "Cannot read properties of undefined (reading 'forwardRef')" error Fix "Cannot read properties of undefined (reading 'forwardRef')" error on certain bundler setup Mar 27, 2025
@MananTank MananTank changed the title Fix "Cannot read properties of undefined (reading 'forwardRef')" error on certain bundler setup Fix "Cannot read properties of undefined (reading 'forwardRef')" error on certain bundler setups Mar 27, 2025
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.56 KB (0%) 952 ms (0%) 80 ms (+169.16% 🔺) 1.1 s
thirdweb (cjs) 127.31 KB (0%) 2.6 s (0%) 137 ms (+65.33% 🔺) 2.7 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 55 ms (+1926.87% 🔺) 167 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 28 ms (+3689.5% 🔺) 38 ms
thirdweb/react (minimal + tree-shaking) 19.34 KB (0%) 387 ms (0%) 64 ms (+1013.61% 🔺) 451 ms

Copy link

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 37.27273% with 69 lines in your changes missing coverage. Please review.

Project coverage is 55.05%. Comparing base (ab738eb) to head (43af4fc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...b/src/react/web/ui/MediaRenderer/MediaRenderer.tsx 37.27% 69 Missing ⚠️

❌ Your patch status has failed because the patch coverage (37.27%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6569      +/-   ##
==========================================
- Coverage   55.07%   55.05%   -0.02%     
==========================================
  Files         883      883              
  Lines       55363    55361       -2     
  Branches     3796     3786      -10     
==========================================
- Hits        30493    30481      -12     
- Misses      24775    24785      +10     
  Partials       95       95              
Flag Coverage Δ
packages 55.05% <37.27%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
...b/src/react/web/ui/MediaRenderer/MediaRenderer.tsx 40.33% <37.27%> (-0.25%) ⬇️

... and 4 files with indirect coverage changes

🚀 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.

@joaquim-verges joaquim-verges merged commit 2d4c5ff into main Mar 27, 2025
32 of 33 checks passed
@joaquim-verges joaquim-verges deleted the tool-3730 branch March 27, 2025 17:41
@joaquim-verges joaquim-verges mentioned this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants