Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [object object] for popovers #1102

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

jesperengstrom
Copy link
Contributor

@jesperengstrom jesperengstrom commented Sep 6, 2024

Solves

Checking that the _label is a string to prevent printing [object object], currently displaying in the role popovers.

example before / after


A bit more in-depth...
Data looking like:

"domain": {
   "@id": "https://id.kb.se/vocab/Work"
},
"_label": {
   "@id": "http://www.w3.org/2000/01/rdf-schema#domain",
   "labelByLang": {
      "en": "Domain",
      "sv": "Förekommer på"
   }
}

_label not being flattened to "Förekommer på", is that a bug? In the next recursion, domain content is hidden, since it contains an @id.

In any which case, I think the string check makes sense...

@jesperengstrom jesperengstrom marked this pull request as ready for review September 6, 2024 08:01
Copy link
Contributor

@johanbissemattsson johanbissemattsson left a comment

Choose a reason for hiding this comment

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

LGTM

_label not being flattened to "Förekommer på", is that a bug? In the next recursion, domain content is hidden, since it contains an @id.

Yes, this sounds lika a bug in LXLJS and should be resolved there. I have created an issue for it: LWS-240.

@jesperengstrom jesperengstrom merged commit 6a92fcf into develop Sep 9, 2024
2 checks passed
@jesperengstrom jesperengstrom deleted the feature/_label-check branch September 9, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants