From 48362a0369877185ff3baf41b19146b12fe9fc21 Mon Sep 17 00:00:00 2001 From: tpluscode Date: Wed, 23 Dec 2020 09:43:13 +0100 Subject: [PATCH] fix: storing empty representations --- .changeset/afraid-seals-boil.md | 5 +++++ src/ResourceStore.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/afraid-seals-boil.md diff --git a/.changeset/afraid-seals-boil.md b/.changeset/afraid-seals-boil.md new file mode 100644 index 0000000..e004fc7 --- /dev/null +++ b/.changeset/afraid-seals-boil.md @@ -0,0 +1,5 @@ +--- +"alcaeus": patch +--- + +Empty representation cannot be retrieved back from ResourceStore diff --git a/src/ResourceStore.ts b/src/ResourceStore.ts index 247ab17..b2ca0ea 100644 --- a/src/ResourceStore.ts +++ b/src/ResourceStore.ts @@ -65,7 +65,7 @@ export default class ResourceStoreImpl implements Reso const node = cf({ dataset: this.dataset, graph }) const response = this.responses.get(graph) - if (!node.out().values.length || !response) { + if (!response) { return undefined }