Fix: octoprint error when progress empty

This commit is contained in:
shamoon 2023-10-27 08:12:47 -07:00
parent 1da9255578
commit 1cdd6b35b9

View File

@ -39,7 +39,7 @@ export default function Component({ service }) {
const printingStateFalgs = ["Printing", "Paused", "Pausing", "Resuming"];
if (printingStateFalgs.includes(state)) {
const { completion } = jobStats?.progress ?? undefined;
const completion = jobStats?.progress?.completion;
if (!jobStats || !completion) {
return (