Skip to content

Commit 7171058

Browse files
committed
update comments
1 parent 4d92b93 commit 7171058

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/openneuro-server/src/datalad/description.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ export const repairDescriptionTypes = (description) => {
5858
for (const field of arrayStringFields) {
5959
if (Object.hasOwn(description, field)) {
6060
if (!isArrayOfStrings(description[field])) {
61-
// Check if the array is corrupted with objects (DataCite flow)
61+
// Check if the array is corrupted
6262
if (Array.isArray(description[field])) {
6363
newDescription[field] = description[field]
6464
.map((item) => {
6565
// If item is an object with a 'name' field (DataCite contributor), extract the name.
6666
if (typeof item === "object" && item !== null && item.name) {
6767
return String(item.name)
6868
}
69-
// Otherwise, attempt to stringify the item (might still produce garbage, but defensive)
69+
// Otherwise, attempt to stringify the item
7070
return String(item)
7171
})
72-
.filter((s) => typeof s === "string" && s.trim().length > 0) // Keep only clean strings
72+
.filter((s) => typeof s === "string" && s.trim().length > 0)
7373
} else {
74-
// If it's not an array at all, replace with an empty array (original logic)
74+
// If it's not an array at all (original logic)
7575
newDescription[field] = []
7676
}
7777
}

0 commit comments

Comments
 (0)