diff --git a/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts b/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts index 90b1a29a..618d279e 100644 --- a/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts +++ b/sharedComponents/schema2jsonld/service/open-aire-jsonld-converter.service.ts @@ -196,7 +196,7 @@ convertDatasource(datasource: any, URL, otherUrl): Organization { private getDescription(result: any): String[] { const item = _.get(result, "result.metadata.oaf:entity.oaf:result.description", null); if (!item) return this.getTitle(result); - let descr = Array.isArray(item) ? item[0]:item + ""; // +"" to make string: if description is number descr.substring returns error + let descr = Array.isArray(item) ? item[0]+ "":item + ""; // +"" to make string: if description is number descr.substring returns error return [descr?(descr.substring(0,4997)+(descr.substring(0,4997).length == 4997?'...':'')):"" as String]; }