Fix jobStats potentially accessed before instantiated
This commit is contained in:
parent
19bf7a0e5a
commit
5c25279439
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ export default function Component({ service }) {
|
||||||
const printingStateFalgs = ["Printing", "Paused", "Pausing", "Resuming"];
|
const printingStateFalgs = ["Printing", "Paused", "Pausing", "Resuming"];
|
||||||
|
|
||||||
if (printingStateFalgs.includes(state)) {
|
if (printingStateFalgs.includes(state)) {
|
||||||
const { completion } = jobStats.progress;
|
const { completion } = jobStats?.progress ?? undefined;
|
||||||
|
|
||||||
if (!jobStats || !completion) {
|
if (!jobStats || !completion) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue