handle corner case if missing widget on restore
This commit is contained in:
parent
2d189790dc
commit
556729fec4
1 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue