This commit is contained in:
Henry Jameson 2026-08-04 21:10:07 +03:00
commit b8a0f540a3
6 changed files with 20 additions and 24 deletions

View file

@ -239,9 +239,9 @@ const conversation = {
depth,
},
walk(forest, forest[id], depth + 1, processed),
].reduce((a, b) => a.concat(b), [])
].flat()
})
.reduce((a, b) => a.concat(b), [])
.flat()
const linearized = walk(
threads.forest,

View file

@ -408,7 +408,7 @@ const EmojiPicker = {
isFirstRow: index === 0,
})),
)
.reduce((a, c) => a.concat(c), [])
.flat()
},
languages() {
return ensureFinalFallback(

View file

@ -24,7 +24,7 @@ export const getAllPossibleCombinations = (array) => {
const nonSelf = array.filter((x) => !selfSet.has(x))
return nonSelf.map((x) => [...self, x])
})
const flatCombos = newCombos.reduce((acc, x) => [...acc, ...x], [])
const flatCombos = newCombos.flat()
const uniqueComboStrings = new Set()
const uniqueCombos = flatCombos.map(sortBy).filter((x) => {
if (uniqueComboStrings.has(x.join())) {
@ -36,7 +36,7 @@ export const getAllPossibleCombinations = (array) => {
})
combos.push(uniqueCombos)
}
return combos.reduce((acc, x) => [...acc, ...x], [])
return combos.flat()
}
/**

View file

@ -559,9 +559,9 @@ export const convertTheme2To3 = (data) => {
const flatExtRules = extendedRules
.filter(Boolean)
.reduce((acc, x) => [...acc, ...x], [])
.flat()
.filter(Boolean)
.reduce((acc, x) => [...acc, ...x], [])
.flat()
return [
generateRoot(),

View file

@ -262,7 +262,7 @@ export const init = ({
...r,
})),
)
.reduce((acc, arr) => [...acc, ...arr], []),
.flat()
...inputRuleset,
].map((rule) => {
normalizeCombination(rule)
@ -705,7 +705,7 @@ export const init = ({
.map((variant) => {
return stateCombinations.map((state) => ({ variant, state }))
})
.reduce((acc, x) => [...acc, ...x], [])
.flat()
stateVariantCombination.forEach((combination) => {
combination.component = component.name

View file

@ -120,23 +120,19 @@ export const useEmojiStore = defineStore('emoji', {
}, {})
},
standardEmojiList(state) {
return (
SORTED_EMOJI_GROUP_IDS.map((groupId) =>
(this.emoji[groupId] || []).map((k) =>
injectAnnotations(k, this.unicodeEmojiAnnotations),
),
).reduce((a, b) => a.concat(b), []) ?? []
)
return SORTED_EMOJI_GROUP_IDS.map((groupId) =>
(this.emoji[groupId] || []).map((k) =>
injectAnnotations(k, this.unicodeEmojiAnnotations),
),
).flat()
},
standardEmojiGroupList(state) {
return (
SORTED_EMOJI_GROUP_IDS.map((groupId) => ({
id: groupId,
emojis: (this.emoji[groupId] || []).map((k) =>
injectAnnotations(k, this.unicodeEmojiAnnotations),
),
})) ?? []
)
return SORTED_EMOJI_GROUP_IDS.map((groupId) => ({
id: groupId,
emojis: (this.emoji[groupId] || []).map((k) =>
injectAnnotations(k, this.unicodeEmojiAnnotations),
),
}))
},
},
actions: {