From a31c0aa8356bc8bc23190ff351236f1637a1c73d Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Fri, 1 Dec 2023 02:24:14 +0000 Subject: [PATCH] Error handling for CSM calibration check --- .../modalComponents/calibrationModal.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/webapp/src/components/modalComponents/calibrationModal.vue b/webapp/src/components/modalComponents/calibrationModal.vue index 054ecf85..71380f36 100644 --- a/webapp/src/components/modalComponents/calibrationModal.vue +++ b/webapp/src/components/modalComponents/calibrationModal.vue @@ -201,11 +201,15 @@ export default { show: async function() { // Check if the camera and stage are calibrated, if they can be if (this.canCSMCalibrated) { - let csm = this.readThingProperty( - "camera_stage_mapping", - "image_to_stage_displacement_matrix" - ); - this.isCSMCalibrated = Boolean(csm); + try { + let csm = this.readThingProperty( + "camera_stage_mapping", + "image_to_stage_displacement_matrix" + ); + this.isCSMCalibrated = Boolean(csm); + } catch { + this.isCSMCalibrated = false; + } } if (this.canLSTCalibrated) { this.isLSTCalibrated = this.readThingProperty(