diff --git a/templates/tpos/index.html b/templates/tpos/index.html
index 4e778ee..2c63aa0 100644
--- a/templates/tpos/index.html
+++ b/templates/tpos/index.html
@@ -859,17 +859,13 @@
},
computed: {
categoryList() {
- return this.tposs.reduce((acc, tpos) => {
- tpos.items.forEach(item => {
- item.categories &&
- item.categories.forEach(category => {
- if (!acc.includes(category)) {
- acc.push(category)
- }
- })
- })
- return acc
- }, [])
+ return Array.from(
+ new Set(
+ this.tposs.flatMap(tpos =>
+ tpos.items.flatMap(item => item.categories || [])
+ )
+ )
+ )
}
},
methods: {