Skip to content

Commit e3b35f4

Browse files
committed
doveadm: Optimize data chunk
1 parent 2ae132c commit e3b35f4

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

components/DoveadmComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const d = Object.fromEntries(Object.entries(data.doveadm).filter(([k, v]) =>
1515
(v.plugin && v.plugin == props.plugin)) ||
1616
(props.tag &&
1717
((v.plugin && v.plugin == props.tag) ||
18-
(v.tags.includes(props.tag))))
18+
(v.tags?.includes(props.tag))))
1919
).sort())
2020
2121
const cliComponent = ref({})

data/doveadm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const doveadm = {
2424
// If set, will use as command example argument.
2525
// i.e., for HTTP API requests, this argument will be added
2626
// to the example argument string.
27-
example: false,
27+
// example: "foo",
2828

2929
// If true, this is an optional positional argument.
3030
// optional: true,

lib/doveadm.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getVitepressMd } from './markdown.js'
22
import { loadData, normalizeArrayData } from './utility.js'
33
import camelCase from 'camelcase'
4+
import cleanDeep from 'clean-deep'
45
import slugify from '@sindresorhus/slugify'
56

67
/* List of Doveadm argument value types. */
@@ -223,7 +224,9 @@ async function normalizeDoveadm(doveadm) {
223224
}
224225

225226
export async function loadDoveadm() {
226-
return await normalizeDoveadm(
227-
structuredClone((await loadData('doveadm')).doveadm)
227+
return cleanDeep(
228+
await normalizeDoveadm(
229+
structuredClone((await loadData('doveadm')).doveadm)
230+
)
228231
)
229232
}

0 commit comments

Comments
 (0)