fix isNaN stock top z when no stock set

This commit is contained in:
Stewart Allen 2022-11-01 20:05:16 -04:00
commit c6e0e6944c

View file

@ -90,7 +90,7 @@ function platformUpdateTopZ(zdelta) {
const hasStock = stock.x && stock.y && stock.z;
const MODE = get_mode();
api.widgets.each(widget => {
if (MODE === MODES.CAM) {
if (MODE === MODES.CAM && hasStock) {
const bounds = widget.getBoundingBox();
const wzmax = bounds.max.z;
const zdelta = process.camZOffset || 0;