mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 05:49:30 +08:00
Don't add an empty class to the list elements in the hamburger
This commit is contained in:
parent
07b9c351a4
commit
9d4405d602
|
@ -4,7 +4,11 @@ import { h } from 'virtual-dom';
|
||||||
createWidget('menu-links', {
|
createWidget('menu-links', {
|
||||||
html(attrs) {
|
html(attrs) {
|
||||||
const links = [].concat(attrs.contents());
|
const links = [].concat(attrs.contents());
|
||||||
const liOpts = { className: attrs.heading ? 'heading' : '' };
|
const liOpts = {};
|
||||||
|
|
||||||
|
if (attrs.heading) {
|
||||||
|
liOpts.className = 'header';
|
||||||
|
}
|
||||||
|
|
||||||
const result = [];
|
const result = [];
|
||||||
result.push(h('ul.menu-links.columned', links.map(l => h('li', liOpts, l))));
|
result.push(h('ul.menu-links.columned', links.map(l => h('li', liOpts, l))));
|
||||||
|
|
|
@ -114,6 +114,7 @@ widgetTest('general links', {
|
||||||
anonymous: true,
|
anonymous: true,
|
||||||
|
|
||||||
test(assert) {
|
test(assert) {
|
||||||
|
assert.ok(this.$("li[class='']").length === 0);
|
||||||
assert.ok(this.$('.latest-topics-link').length);
|
assert.ok(this.$('.latest-topics-link').length);
|
||||||
assert.ok(!this.$('.new-topics-link').length);
|
assert.ok(!this.$('.new-topics-link').length);
|
||||||
assert.ok(!this.$('.unread-topics-link').length);
|
assert.ok(!this.$('.unread-topics-link').length);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user