diff --git a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/Extension.ts index db1c2f7ff..f3e7de265 100644 --- a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/Extension.ts @@ -614,8 +614,12 @@ export default class OpenSeadragonExtension extends BaseExtension { // todo: can this be added to store? const paged = this.isPagingSettingEnabled(); - const { downloadDialogueOpen, dialogueTriggerButton } = - this.store.getState() as OpenSeadragonExtensionState; + // Try to initialize using the stored state; exit early if the state is not ready yet: + const state: null | OpenSeadragonExtensionState = this.store.getState(); + if (state === null) { + return; + } + const { downloadDialogueOpen, dialogueTriggerButton } = state; // todo: can the overlay visibility be added to the store? if (downloadDialogueOpen) { diff --git a/src/index.html b/src/index.html index 71f1110e6..681f4f903 100644 --- a/src/index.html +++ b/src/index.html @@ -244,6 +244,16 @@

Annotations

+ +
+

Custom Configuration

+ +
+ +
+