From 3a2a512b47847a063c3d234d7639cbd5acdc8ddd Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 15:16:21 +0000 Subject: [PATCH] fix: don't render "null" under the total with a single currency 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 Claude-Session: https://claude.ai/code/session_0127iNTyhnYEypEm4cd97XPA --- CHANGELOG.md | 6 ++++++ js/app.js | 10 +++++++--- js/core/version.js | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e539530..6cb1766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [1.0.2] - 2026-10-04 + +### Fixed + +- The spending summary showed the text "null" under the total when all subscriptions use the same currency. + ## [1.0.1] - 2026-10-04 ### Fixed diff --git a/js/app.js b/js/app.js index d7aed11..705d76d 100644 --- a/js/app.js +++ b/js/app.js @@ -5,7 +5,7 @@ 'use strict'; const ST = g.ST; const { db, schedule, catalog, i18n, ui, reminders } = ST; - const { h, icon, logo, sheet, toast, haptic } = ui; + const { h, append, icon, logo, sheet, toast, haptic } = ui; const t = (...a) => i18n.t(...a); const state = { @@ -189,13 +189,17 @@ }, }))); - $('summary').replaceChildren( + // ui.append skips null children; native replaceChildren() would render + // a missing note as the text "null". + $('summary').replaceChildren(); + append($('summary'), [ h('div', { class: 'summary-top' }, h('p', { class: 'summary-label', text: t(yearly ? 'summary.yearly' : 'summary.monthly') }), seg), amount, extra, - h('p', { class: 'summary-count', text: i18n.tp('summary.active', activeCount) })); + h('p', { class: 'summary-count', text: i18n.tp('summary.active', activeCount) }), + ]); } function renderUpcoming(rows) { diff --git a/js/core/version.js b/js/core/version.js index 1093d75..bb71623 100644 --- a/js/core/version.js +++ b/js/core/version.js @@ -2,6 +2,6 @@ (function (g) { 'use strict'; const ST = (g.ST = g.ST || {}); - ST.VERSION = '1.0.1'; + ST.VERSION = '1.0.2'; ST.REPO_URL = 'https://github.com/lestolo/subscription-tracker'; })(typeof self !== 'undefined' ? self : globalThis);