attestate / kiwistand

kiwistand is a p2p node client for a web3 writer friendly Hacker News that nobody controls but everybody co-owns
https://news.kiwistand.com
GNU General Public License v3.0
63 stars 25 forks source link

/dau page crashes for a node that has no/little content yet #54

Closed TimDaub closed 1 year ago

TimDaub commented 1 year ago
[1] file:///Users/timdaub/Projects/attestate/kiwistand/node_modules/svg-line-chart/dist/svg-line-chart.mjs:11279
[1]   const startDate = new Date(interval.start.getTime());
[1]                                             ^
[1]
[1] TypeError: Cannot read properties of undefined (reading 'getTime')
[1]     at eachMonthOfInterval (file:///Users/timdaub/Projects/attestate/kiwistand/node_modules/svg-line-chart/dist/svg-line-chart.mjs:11279:45)
[1]     at scaleDates (file:///Users/timdaub/Projects/attestate/kiwistand/node_modules/svg-line-chart/dist/svg-line-chart.mjs:11429:18)
[1]     at _plot (file:///Users/timdaub/Projects/attestate/kiwistand/node_modules/svg-line-chart/dist/svg-line-chart.mjs:11301:30)
[1]     at default (file:///Users/timdaub/Projects/attestate/kiwistand/src/views/dau.mjs:78:27)
[1]     at async file:///Users/timdaub/Projects/attestate/kiwistand/src/http.mjs:152:21
[1]
[1] Node.js v19.6.0
[1] npm run start exited with code 1