sindresorhus/refined-github



The issue has been closed
Repository age shown as `NaN undefined old` after first opening repo #2603
maxmclau posted onGitHub
Opening a repository for the first time it'll properly display the creation date. Refreshing the page results in NaN undefined old.
<img width="889" alt="Screen Shot 2019-12-06 at 2 21 05 PM" src="https://user-images.githubusercontent.com/3848317/70357239-a93d7f80-1833-11ea-97df-26cc52bd50b9.png">
The issue is in the timeAgo()
function. For some reason, it returns null values after a refresh. It feels like a caching issue, but caching of this value hasn't yet been implemented.
// source/libs/time-ago.tsx
const time = (<time-ago datetime={date.toISOString()} format="micro"/>).textContent!;
time
will just return a blank string after being fetched once. I played around with it, but I'm stumped. This is effecting the current release.