Repository navigation
fix: don't render "null" under the total with a single currency - #5
Merged
Merged
Conversation
renderSummary() passed the optional note straight to the native replaceChildren(), which stringifies null instead of skipping it, so single-currency users saw "null" under the total. Build the summary with ui.append(), which skips null children like h() does. Bumps the version to 1.0.2 so installed apps refresh the offline cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0127iNTyhnYEypEm4cd97XPA
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When every subscription uses the same currency, the spending summary showed the text "null" under the total. The bug was reported from a real device.
The note under the total only appears when there are several currencies ("Totali per valuta") or when exchange rates are set ("Totale approssimato…"). Otherwise it is
null.renderSummary()injs/app.jspassed that value to the nativeElement.replaceChildren(), which turnsnullinto the text"null"instead of skipping it. Earlier tests always included a USD subscription, so the note was nevernulland the single-currency case went unnoticed.The summary is now built with
ui.append(), the same null-skipping helper thath()uses, after clearing the container. No otherreplaceChildren()call in the codebase receives an optional child.It also bumps
ST.VERSIONto 1.0.2 so installed apps refresh the offline cache, and updates the CHANGELOG.Type of change
Checklist
npm testpassesnull;js/core/i18n.js(none added)ST.VERSIONbumped if cached assets changed (sw.js→ASSETS)🤖 Generated with Claude Code
https://claude.ai/code/session_0127iNTyhnYEypEm4cd97XPA
Generated by Claude Code