Fix jobStats potentially accessed before instantiated

pull/1802/head
shamoon 1 year ago
parent 19bf7a0e5a
commit 5c25279439

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

Loading…
Cancel
Save