From e9d49f060ba53948cf342bcdf5c1dd3be8522e8b Mon Sep 17 00:00:00 2001 From: Nils Haberkamp Date: Mon, 4 Mar 2024 10:26:39 +0100 Subject: [PATCH] get rid of duplicate slot checks --- .../src/components/layout/sw-card/sw-card.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/component-library/src/components/layout/sw-card/sw-card.vue b/packages/component-library/src/components/layout/sw-card/sw-card.vue index 25229e4a2..9f6e6e788 100644 --- a/packages/component-library/src/components/layout/sw-card/sw-card.vue +++ b/packages/component-library/src/components/layout/sw-card/sw-card.vue @@ -121,11 +121,8 @@ export default defineComponent({ return ( !!this.title || !!this.$slots.title || - !!this.$slots.title || !!this.subtitle || !!this.$slots.subtitle || - !!this.$slots.subtitle || - !!this.$slots.avatar || !!this.$slots.avatar ); }, @@ -134,14 +131,14 @@ export default defineComponent({ methods: { cardClasses() { return { - "sw-card--grid": !!this.$slots.grid || !!this.$slots.grid, + "sw-card--grid": !!this.$slots.grid, "sw-card--hero": !!this.hero, "sw-card--large": this.large, "has--header": !!this.showHeader, - "has--title": !!this.title || !!this.$slots.title || !!this.$slots.title, - "has--subtitle": !!this.subtitle || !!this.$slots.subtitle || !!this.$slots.subtitle, - "has--toolbar": !!this.$slots.toolbar || !!this.$slots.toolbar, - "has--footer": !!this.$slots.footer || !!this.$slots.footer, + "has--title": !!this.title || !!this.$slots.title, + "has--subtitle": !!this.subtitle, + "has--toolbar": !!this.$slots.toolbar, + "has--footer": !!this.$slots.footer, }; }, },