Skip to content

Commit

Permalink
🐛 fix: no monitorHistoryData
Browse files Browse the repository at this point in the history
  • Loading branch information
yunsii committed Mar 22, 2024
1 parent b5d35b9 commit f1342c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/index/+data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ export async function data(pageContext: PageContext) {

try {
const { allMonitors, kvData } = await getCoreData(useRemoteMonitors)
const { lastUpdate, monitorHistoryData = {} } = kvData
const { lastUpdate, monitorHistoryData } = kvData

if (!monitorHistoryData) {
return kvData
}

return {
allMonitors,
kvData: {
Expand Down

0 comments on commit f1342c1

Please sign in to comment.