@digitalculture/ochre-sdk 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1981,7 +1981,7 @@ async function fetchGallery(uuid, filter, page, perPage) {
1981
1981
  const gallery = {
1982
1982
  identification: galleryIdentification,
1983
1983
  projectIdentification: galleryProjectIdentification,
1984
- resources: Array.isArray(data.result.gallery.resource) ? parseResources(data.result.gallery.resource) : [parseResource(data.result.gallery.resource)],
1984
+ resources: data.result.gallery.resource ? Array.isArray(data.result.gallery.resource) ? parseResources(data.result.gallery.resource) : [parseResource(data.result.gallery.resource)] : [],
1985
1985
  maxLength: data.result.gallery.maxLength
1986
1986
  };
1987
1987
  return gallery;
package/dist/index.js CHANGED
@@ -1904,7 +1904,7 @@ async function fetchGallery(uuid, filter, page, perPage) {
1904
1904
  const gallery = {
1905
1905
  identification: galleryIdentification,
1906
1906
  projectIdentification: galleryProjectIdentification,
1907
- resources: Array.isArray(data.result.gallery.resource) ? parseResources(data.result.gallery.resource) : [parseResource(data.result.gallery.resource)],
1907
+ resources: data.result.gallery.resource ? Array.isArray(data.result.gallery.resource) ? parseResources(data.result.gallery.resource) : [parseResource(data.result.gallery.resource)] : [],
1908
1908
  maxLength: data.result.gallery.maxLength
1909
1909
  };
1910
1910
  return gallery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",