respec pill (error)
- Dominant language
- JavaScript
- Stars
- 806
- Forks
- 434
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 32
Description
Description of problem
Clicking on the error pill does not show a list. This goes wrong when the error is a string.
When the error is a string then firstElementChild and lastElementChild are both null, firstChild and lastChild contain text.
The part in ui.js that wants to show the list expects html (from objects) and should have an additional check.
if (fragment.firstElementChild === fragment.lastElementChild) {
li.append(
.../** @type {Element} */ (fragment.firstElementChild).childNodes
);
An alternative approach could be to get rid of string errors/warnings.
URL to affected spec or repo: https://geonovum.github.io/dso-cim-ow/
What happened (e.g., it crashed)?: Code crashes (developer console)
Expected behavior (e.g., it shouldn't crash): When clicking on the pill it should show a list (even for string messages).
Optional, steps to reproduce:
- leave out the mandatory sotd section (SotD paragraph).
- open the document and click on the red pill
- no list is shown
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.