Don't add an empty class to the list elements in the hamburger

This commit is contained in:
Robin Ward 2017-02-13 11:27:30 -05:00
parent 07b9c351a4
commit 9d4405d602
2 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,11 @@ import { h } from 'virtual-dom';
createWidget('menu-links', {
html(attrs) {
const links = [].concat(attrs.contents());
const liOpts = { className: attrs.heading ? 'heading' : '' };
const liOpts = {};
if (attrs.heading) {
liOpts.className = 'header';
}
const result = [];
result.push(h('ul.menu-links.columned', links.map(l => h('li', liOpts, l))));

View File

@ -114,6 +114,7 @@ widgetTest('general links', {
anonymous: true,
test(assert) {
assert.ok(this.$("li[class='']").length === 0);
assert.ok(this.$('.latest-topics-link').length);
assert.ok(!this.$('.new-topics-link').length);
assert.ok(!this.$('.unread-topics-link').length);