From 6d924c92ef00075ee9b8ffe1a2ba7b18b4cd9559 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 27 May 2020 14:19:32 +0100 Subject: [PATCH] Run modal callback even if it never shows --- src/components/modalComponents/calibrationModal.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/modalComponents/calibrationModal.vue b/src/components/modalComponents/calibrationModal.vue index 368ed29d..5383eca4 100644 --- a/src/components/modalComponents/calibrationModal.vue +++ b/src/components/modalComponents/calibrationModal.vue @@ -244,13 +244,15 @@ export default { }) .then(() => { // Check if this calibration wizard can actually do anything useful - console.log(this.isUseful); if (this.isUseful) { this.ready = true; this.stepValue = 0; // Show the modal var el = this.$refs["calibrationModalEl"]; this.showModalElement(el); // Calls the mixin + } else { + // If not useful, we just return the onClose event immediately + this.onHide(); } }); },