diff --git a/lib/jsonld_serializers.js b/lib/jsonld_serializers.js index f0a24f5a..6e743478 100644 --- a/lib/jsonld_serializers.js +++ b/lib/jsonld_serializers.js @@ -395,8 +395,10 @@ class ItemResultsSerializer extends JsonLdListSerializer { return `resources:${result.uri}` } - static serialize (items, opts) { - const results = items.map((i) => ItemResourceSerializer.serialize(i)) + static async serialize (items, opts) { + const results = await Promise.all( + items.map((i) => ItemResourceSerializer.serialize(i)) + ) return (new ItemResultsSerializer(results, opts)).format() } }