chore(catalog/star): only set the cache if there are entries from the response

This commit is contained in:
blam
2020-06-10 13:58:50 +02:00
parent 983c119c78
commit b619490fe0
+5 -1
View File
@@ -77,7 +77,11 @@ export class CatalogClient implements CatalogApi {
);
}
const value = await response.json();
this.cache.set(`get:${JSON.stringify(filter)}`, value);
if (value?.length) {
this.cache.set(`get:${JSON.stringify(filter)}`, value);
}
return value;
}