Merge pull request #655 from nilathedragon/patch-1

Do not assume languages array will contain entries
This commit is contained in:
Gregory K 2023-07-25 19:12:56 +03:00 committed by GitHub
commit 8887f75b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ public class Instance extends BaseModel{
ci.domain=uri;
ci.normalizedDomain=IDN.toUnicode(uri);
ci.description=Html.fromHtml(shortDescription).toString().trim();
if(languages!=null){
if(languages!=null&&languages.size()>0){
ci.language=languages.get(0);
ci.languages=languages;
}else{