Commit 24413f33 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Fixed duplicated entities

parent c52b4cd1efdd
......@@ -194,7 +194,11 @@ export class MetaPropertyObject implements MetaProperty {
languages: Language[],
resolver: ObjectResolver
): any {
let result = entity.getEntitiesForS(this.uri).map((e: RdfEntity) => {
let result: RdfEntity[] = [];
entity.getEntitiesForS(this.uri).forEach((e: RdfEntity) => {
if (result.indexOf(e) < 0) result.push(e);
});
result = result.map((e: RdfEntity) => {
let focus = e.getEntityForS("http://xmlns.com/foaf/0.1/focus");
let real = focus != null ? focus : e;
return resolver(real, this.metaClass);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment