handle empty ams slots
This commit is contained in:
parent
4c05f6de33
commit
484d417058
1 changed files with 3 additions and 1 deletions
|
|
@ -184,7 +184,9 @@ self.kiri.load(api => {
|
|||
$('bbl_tray_demo').style.backgroundColor = `#${bambu.tray_color.substring(0,6)}`;
|
||||
let ams_colors = [];
|
||||
for (let tray of ams_trays) {
|
||||
ams_colors.addOnce(tray.tray_color);
|
||||
if (tray.tray_color) {
|
||||
ams_colors.addOnce(tray.tray_color);
|
||||
}
|
||||
}
|
||||
h.bind($('bbl_tray_acolor'), ams_colors.map(color => h.button({
|
||||
style: `background-color: #${color.substring(0,6)};aspect-ratio:1`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue