patrickkuo / PanelPi

Raspberry Pi control panel for DuetWifi
GNU General Public License v3.0
9 stars 4 forks source link

File view throws error when no filament length detected #6

Open badvision opened 5 years ago

badvision commented 5 years ago

There are some files (usually ones not prepared correctly for RepRap firmware) which the firmware cannot properly detect the filament length. This results in an empty list being sent rather than zero and the code throws an error because of this.

Line 58 of FileView should read cellFormat { text = "${it.firstOrNull()} mm" } or something similar to bypass this issue.