Skip to content

fix: ARenderer TypeError when href is undefined#32

Merged
jsamr merged 2 commits intonative-html:mainfrom
arieloO:patch-1
Apr 14, 2026
Merged

fix: ARenderer TypeError when href is undefined#32
jsamr merged 2 commits intonative-html:mainfrom
arieloO:patch-1

Conversation

@arieloO
Copy link
Copy Markdown
Contributor

@arieloO arieloO commented Mar 27, 2026

Fixes TypeError on href.length when href is undefined

  • tests typeof href is string before reading its length

useNormalizedUrl can return undefined if it fails to parse absolute an url (see: normalizeResourceLocator.ts)

[TypeError: Cannot read property 'length' of undefined]

Fixes TypeError on `href.lenght` when href is undefined
- tests `typeof href` is string before reading its length

`useNormalizedUrl` can return `undefined` if it fails to parse absolute an url (see: normalizeResourceLocator.ts)

> `[TypeError: Cannot read property 'length' of undefined]`
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.65%. Comparing base (5636b6e) to head (ed42508).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   98.65%   98.65%           
=======================================
  Files         140      140           
  Lines        2083     2084    +1     
  Branches      633      634    +1     
=======================================
+ Hits         2055     2056    +1     
  Misses         27       27           
  Partials        1        1           
Flag Coverage Δ
css-processor 100.00% <ø> (ø)
render 97.85% <100.00%> (+<0.01%) ⬆️
transient-render-engine 98.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@5ZYSZ3K
Copy link
Copy Markdown
Collaborator

5ZYSZ3K commented Apr 13, 2026

Hi @arieloO, thanks for the contribution!
I see that everything passes, I'll check the context of this implementation later today and will probably merge that

- see fix: ARenderer TypeError when href is undefined (2c6f82a)
@arieloO arieloO requested a review from jsamr April 13, 2026 16:43
@5ZYSZ3K
Copy link
Copy Markdown
Collaborator

5ZYSZ3K commented Apr 13, 2026

LGTM, let's wait for @jsamr to give the final approve

@jsamr jsamr merged commit 64410f9 into native-html:main Apr 14, 2026
8 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.

3 participants