From 9d4405d602bd8d13bfc74b13f9d4b9fa96e9ab97 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 13 Feb 2017 11:27:30 -0500 Subject: [PATCH] Don't add an empty class to the list elements in the hamburger --- app/assets/javascripts/discourse/widgets/menu-panel.js.es6 | 6 +++++- test/javascripts/widgets/hamburger-menu-test.js.es6 | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/menu-panel.js.es6 b/app/assets/javascripts/discourse/widgets/menu-panel.js.es6 index 8a1ede9663c..607da731a2e 100644 --- a/app/assets/javascripts/discourse/widgets/menu-panel.js.es6 +++ b/app/assets/javascripts/discourse/widgets/menu-panel.js.es6 @@ -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)))); diff --git a/test/javascripts/widgets/hamburger-menu-test.js.es6 b/test/javascripts/widgets/hamburger-menu-test.js.es6 index a6ed500761d..9c6454e47ce 100644 --- a/test/javascripts/widgets/hamburger-menu-test.js.es6 +++ b/test/javascripts/widgets/hamburger-menu-test.js.es6 @@ -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);