From 86937e282195543d5a86cee08a3842a65fd512e1 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Wed, 23 Mar 2016 16:27:11 +0100 Subject: [PATCH] populate .capabilities also if no .ld property found --- src/api.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/api.js b/src/api.js index bd70f72..ad0c2cb 100644 --- a/src/api.js +++ b/src/api.js @@ -117,12 +117,9 @@ export class API { /** * @param ld A framed and compacted JSON-LD document from which Hydra data can be read. */ - constructor (ld) { + constructor (ld = {}) { this.supportedUrlProps = new Map() - if (!ld) return - console.log(ld) - if (ld.view && ld.view.type === PartialCollectionView) { this.isPaged = true this.paging = ld.view