Commit 3d36fc5
fix: hide epoch date when contributors missing
getAppPageLastCommitDate reduced an empty contributors array to
new Date(0), so app pages with no contributor data rendered "Page last
update: January 1, 1970". It now returns "" for empty input, and
getAppPageContributorInfo guards the format call so the timestamp stays
empty rather than formatting an Invalid Date.
Empty is falsy, so FileContributors hides the "last update" line via its
existing guard, and the page JSON-LD emits an empty dateModified instead
of the epoch. Returning "" keeps the type string, avoiding a change
across the ~15 consumers that type the field as string.
The data-side root cause (the fetcher writing empty arrays on GitHub
secondary rate limits) was fixed in #18073; this is the UI-side
defensive complement and supersedes #18071.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>1 parent 1a05dbe commit 3d36fc5
2 files changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
6 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
0 commit comments