Skip to content

Commit 2e49f13

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! feat(json): add legacy JSON generator
1 parent 2e2f3f0 commit 2e49f13

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/generators/legacy-json/utils/buildSection.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,14 @@ function addToParent(section, parentSection) {
254254
* @param {import('../types.d.ts').Section} parentSection - The parent section.
255255
*/
256256
const makeChildrenTopLevelIfMisc = (section, parentSection) => {
257-
if (section.type !== 'misc' || parentSection.type === 'misc') return;
257+
if (section.type !== 'misc' || parentSection.type === 'misc') {
258+
return;
259+
}
258260

259261
Object.keys(section).forEach(key => {
260-
if (['textRaw', 'name', 'type', 'desc', 'miscs'].includes(key)) return;
262+
if (['textRaw', 'name', 'type', 'desc', 'miscs'].includes(key)) {
263+
return;
264+
}
261265
if (parentSection[key]) {
262266
parentSection[key] = Array.isArray(parentSection[key])
263267
? parentSection[key].concat(section[key])

0 commit comments

Comments
 (0)