handle corner case if missing widget on restore

This commit is contained in:
Stewart Allen 2021-12-29 11:51:31 -05:00
commit 556729fec4

View file

@ -426,9 +426,12 @@
meshes: meshArray,
opacity: setOpacity,
annotate: (id) => {
// add per widget annotation
// for things like extruder and supports
return WIDGETS.filter(w => w.id === id)[0].anno;
let w = WIDGETS.filter(w => w.id === id)[0];
if (!w) {
console.log(`annotate missing widget ${id}`);
return {};
}
return (w.anno = w.anno || {});
}
},
work: KIRI.work