Skip to content

Commit

Permalink
Force properties that allow multiple values per language into an array
Browse files Browse the repository at this point in the history
  • Loading branch information
miledivovic committed Aug 15, 2018
1 parent 82d1311 commit ba20c63
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/resources/c-adapter/ceasn/ceasn.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,13 @@ function stripNonCe(f) {
if (k.indexOf("ceasn:competencyText") != 0)
if (EcArray.isArray(f[k]) == false)
f[k] = [f[k]];
//For properties that allow many per language, force it into an array with even just 1 value.
if (k === "ceasn:publisherName" || k === "ceasn:conceptKeyword" || k === "ceasn:comment") {
Object.keys(f[k]).forEach(function(key) {
if (EcArray.isArray(f[k][key]) == false)
f[k][key] = [f[k][key]];
});
}
if (k.indexOf("ceasn:") == 0 || k.indexOf("ceterms:") == 0 || k.indexOf("@") == 0)
;
else
Expand Down

0 comments on commit ba20c63

Please sign in to comment.