Skip to content
Snippets Groups Projects
Commit 90c2873b authored by Olivier Maury's avatar Olivier Maury
Browse files

refactor: :rotating_light: Corriger la condition de création de <ul>

parent 7794ab42
No related branches found
No related tags found
No related merge requests found
......@@ -139,11 +139,11 @@ implements PlaceChangeEvent.Handler {
final Element parentLi = parentItem.getParentElement();
final NodeList<Element> uls = parentLi.getElementsByTagName("ul");
Element ulElem = null;
if (uls.getLength() == 1) {
ulElem = uls.getItem(0);
} else if (uls.getLength() == 0) {
if (uls.getLength() == 0) {
ulElem = Document.get().createULElement();
parentLi.appendChild(ulElem);
} else {
ulElem = uls.getItem(0);
}
final LIElement li = Document.get().createLIElement();
li.addClassName(styleName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment