From c68d383ad59e90fa9fa001e8706d7bf6a86a75c2 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 28 Jul 2024 23:23:43 +0200 Subject: [PATCH] refactor: combine 2 if conditionals Signed-off-by: Stefan Dej --- src/components/panels/ToolheadControls/CrossControl.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/panels/ToolheadControls/CrossControl.vue b/src/components/panels/ToolheadControls/CrossControl.vue index 0cee656d2..caf80cdfa 100644 --- a/src/components/panels/ToolheadControls/CrossControl.vue +++ b/src/components/panels/ToolheadControls/CrossControl.vue @@ -379,10 +379,10 @@ export default class CrossControl extends Mixins(BaseMixin, ControlMixin) { get actionButton(): string { const button = this.$store.state.gui.control.actionButton ?? this.defaultActionButton - if (button === 'qgl' && !this.$store.getters['printer/existsQGL']) { - return this.defaultActionButton - } - if (button === 'ztilt' && !this.$store.getters['printer/existsZTilt']) { + if ( + (button === 'qgl' && !this.$store.getters['printer/existsQGL']) || + (button === 'ztilt' && !this.$store.getters['printer/existsZTilt']) + ) { return this.defaultActionButton }