From 15a996a59ef33482f254ad8754a39801c51ca75a Mon Sep 17 00:00:00 2001 From: ysdmsnr Date: Tue, 20 Sep 2022 13:24:49 +0900 Subject: [PATCH 1/2] "provider" is array. --- src/IIIFResource.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/IIIFResource.ts b/src/IIIFResource.ts index cbbb67c0..f95d977e 100644 --- a/src/IIIFResource.ts +++ b/src/IIIFResource.ts @@ -86,8 +86,9 @@ export class IIIFResource extends ManifestResource { if (!provider) { return null; } - - logo = provider.logo; + if (Array.isArray(provider) && provider.length) { + logo = provider[0].logo; + } } if (!logo) return null; From 3861b16ef2802902820efd4e4a2062602243e218 Mon Sep 17 00:00:00 2001 From: ysdmsnr Date: Tue, 20 Sep 2022 13:27:44 +0900 Subject: [PATCH 2/2] get summary. --- src/IIIFResource.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/IIIFResource.ts b/src/IIIFResource.ts index f95d977e..d2f11637 100644 --- a/src/IIIFResource.ts +++ b/src/IIIFResource.ts @@ -56,6 +56,11 @@ export class IIIFResource extends ManifestResource { return PropertyValue.parse(description, this.options.locale); } + const summary: any = this.getProperty("summary"); + if (summary) { + return PropertyValue.parse(summary, this.options.locale); + } + return new PropertyValue([], this.options.locale); }