From c61fc4712c5d29a253c357859d64eed548a2805d Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 1 Apr 2023 00:10:00 +0200 Subject: [PATCH] fix: fix issue of empty Screws tilt adjust helper dialog Signed-off-by: Stefan Dej --- src/components/dialogs/TheScrewsTiltAdjustDialog.vue | 12 ++++++------ src/store/printer/mutations.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/dialogs/TheScrewsTiltAdjustDialog.vue b/src/components/dialogs/TheScrewsTiltAdjustDialog.vue index b3f2017df..215ec7c07 100644 --- a/src/components/dialogs/TheScrewsTiltAdjustDialog.vue +++ b/src/components/dialogs/TheScrewsTiltAdjustDialog.vue @@ -22,7 +22,10 @@ @@ -50,14 +53,11 @@ import TheScrewsTiltAdjustDialogEntry from '@/components/dialogs/TheScrewsTiltAd export default class TheScrewsTiltAdjustDialog extends Mixins(BaseMixin, ControlMixin) { mdiArrowCollapseDown = mdiArrowCollapseDown mdiCloseThick = mdiCloseThick - get state() { - return this.$store.state.printer.screws_tilt_adjust ?? {} - } get error() { - return this.state.error ?? false + return this.$store.state.printer.screws_tilt_adjust?.error ?? false } get results() { - return this.state.results ?? {} + return this.$store.state.printer.screws_tilt_adjust?.results ?? {} } get showDialog() { return this.error || Object.keys(this.results).length diff --git a/src/store/printer/mutations.ts b/src/store/printer/mutations.ts index 35f56c485..77a1b0232 100644 --- a/src/store/printer/mutations.ts +++ b/src/store/printer/mutations.ts @@ -61,6 +61,6 @@ export const mutations: MutationTree = { clearScrewsTiltAdjust(state) { Vue.set(state.screws_tilt_adjust, 'error', false) - Vue.set(state.screws_tilt_adjust, 'results', []) + Vue.set(state.screws_tilt_adjust, 'results', {}) }, }