Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Fix jsonld label error#24

Merged
demiankatz merged 2 commits into
IIIF-Commons:devfrom
LlGC-jop:fix-jsonld-label-error
Mar 13, 2025
Merged

Fix jsonld label error#24
demiankatz merged 2 commits into
IIIF-Commons:devfrom
LlGC-jop:fix-jsonld-label-error

Conversation

@LlGC-jop

Copy link
Copy Markdown
Contributor

There seems to have been an issue since v2.0.4, at least in the umd version, where if the __jsonld property doesn't exist on line 109 the switch from the default view to date grouping will fail.

This PR adds an additional check to the if() to ensure it does before attempting to check/use .label

Additionally the example index.html file is changed to use an appropriate manifest for testing purposes.

I've not used optional chaining because the TS version doesn't seem to support it, but that's a separate issue.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @LlGC-jop!

@demiankatz demiankatz merged commit 36391a3 into IIIF-Commons:dev Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants