From dfcb2e26db92040ffe101acbce0c2147d13c3fef Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 30 Oct 2019 15:22:48 +0100 Subject: [PATCH] Limit categories per instance to 3 --- src/components/InstanceCard.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/InstanceCard.vue b/src/components/InstanceCard.vue index 2c765c8..3abba77 100644 --- a/src/components/InstanceCard.vue +++ b/src/components/InstanceCard.vue @@ -34,7 +34,7 @@
-
+
{{ translatedThemes[category] }}
@@ -251,6 +251,12 @@ .map(l => this.translatedLanguages[l]) .filter(l => !!l) .join(', ') + }, + + limitedCategories () { + if (Array.isArray(this.instance.categories) === false) return [] + + return this.instance.categories.slice(0, 3) } },