Skip to content

Commit

Permalink
Merge pull request OpenG2P#253 from shivamg9/17.0-develop
Browse files Browse the repository at this point in the history
G2P-2617: Handle array values in G2PAdditionalInfoWidget
  • Loading branch information
shibu-narayanan authored Jul 18, 2024
2 parents b5ca601 + 9e09d83 commit fc15a58
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ export class G2PAdditionalInfoWidget extends TextField {
}
for (const key in jsonObject) {
if (!jsonObject[key]) continue;
if (
if (Array.isArray(jsonObject[key])) {
// Handle arrays by joining their elements with a comma and space
jsonObject[key] = jsonObject[key].join(", ");
} else if (
Array.isArray(jsonObject[key]) &&
jsonObject[key].length > 0 &&
"document_id" in jsonObject[key][0] &&
Expand Down

0 comments on commit fc15a58

Please sign in to comment.