From a28de294fa5ca6f9f33f25d7d8b5b5ddeac71cb0 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 18 Mar 2023 23:59:36 +0000 Subject: [PATCH] Fix cached stats not having 3d printer status --- webclient/src/Home.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webclient/src/Home.js b/webclient/src/Home.js index b865298..3b68d39 100644 --- a/webclient/src/Home.js +++ b/webclient/src/Home.js @@ -244,7 +244,7 @@ export function Home(props) { const closedStat = (x) => stats && stats.closing ? moment().unix() > stats.closing['time'] ? 'Closed' : 'Open until ' + stats.closing['time_str'] : 'Unknown'; - const printer3dStat = (x) => stats && stats.printer3d[x] ? stats.printer3d[x].state === 'Printing' ? 'Printing (' + stats.printer3d[x].progress + '%)' : stats.printer3d[x].state : 'Unknown'; + const printer3dStat = (x) => stats && stats.printer3d && stats.printer3d[x] ? stats.printer3d[x].state === 'Printing' ? 'Printing (' + stats.printer3d[x].progress + '%)' : stats.printer3d[x].state : 'Unknown'; const show_signup = stats?.at_protospace;