diff --git a/lib/atom.js b/lib/atom.js index 3a56c31..22be787 100644 --- a/lib/atom.js +++ b/lib/atom.js @@ -117,7 +117,7 @@ export function atom(channel, data) { if (datum.tags) { let offset = -1 while (++offset < datum.tags.length) { - items.push(x('category', {term: String(datum.tags[offset])})) + children.push(x('category', {term: String(datum.tags[offset])})) } } diff --git a/package.json b/package.json index 514f8e3..f1f32d5 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", "type-coverage": "^2.0.0", - "typescript": "^4.0.0", + "typescript": "^5.0.0", "xast-util-to-xml": "^3.0.0", "xo": "^0.53.0" }, diff --git a/test.js b/test.js index d0f8c04..081135f 100644 --- a/test.js +++ b/test.js @@ -1998,6 +1998,18 @@ test('atom', () => { name: 'title', attributes: {}, children: [{type: 'text', value: 'c'}] + }, + { + type: 'element', + name: 'category', + attributes: {term: 'x'}, + children: [] + }, + { + type: 'element', + name: 'category', + attributes: {term: 'y'}, + children: [] } ] },