Skip to content

Commit

Permalink
[BP] fix for empty language leading to spurious comma
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimnielandt authored and josegar74 committed Dec 21, 2023
1 parent eb0ca1e commit d24aed4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,18 @@
getUuid: function () {
return this.uuid;
},
getMetadataLanguages: function () {
if (!this.mainLanguage) {
return [];
}
return [this.mainLanguage]
.concat(this.otherLanguage)
.unique()
.filter(function (l) {
// do not allow null values
return !!l;
});
},
isPublished: function (pubOption) {
if (pubOption) {
return this.isPublishedToGroup(pubOption.publicationGroup);
Expand Down

0 comments on commit d24aed4

Please sign in to comment.