diff --git a/app/assets/javascripts/discourse/widgets/user-menu.js.es6 b/app/assets/javascripts/discourse/widgets/user-menu.js.es6 index bdb1c4ed9bd..db8207c688b 100644 --- a/app/assets/javascripts/discourse/widgets/user-menu.js.es6 +++ b/app/assets/javascripts/discourse/widgets/user-menu.js.es6 @@ -23,9 +23,14 @@ createWidget('user-menu-links', { const glyphs = []; if (extraGlyphs) { - // yes glyphs.push(...extraGlyphs) is nicer, but pulling in - // _toConsumableArray seems totally uneeded here - glyphs.push.apply(glyphs, extraGlyphs); + extraGlyphs.forEach(g => { + if (typeof g === "function") { + g = g(this); + } + if (g) { + glyphs.push(g); + } + }); } glyphs.push({ label: 'user.bookmarks',