From 441ac21053d86d5f6529618b1576bffe63a41fd6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 17 Aug 2020 15:49:07 -0400 Subject: [PATCH] FIX: Broken when iconList missing --- .../javascripts/discourse-common/addon/lib/icon-library.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse-common/addon/lib/icon-library.js b/app/assets/javascripts/discourse-common/addon/lib/icon-library.js index 6041bc7272f..0bf8d8678bb 100644 --- a/app/assets/javascripts/discourse-common/addon/lib/icon-library.js +++ b/app/assets/javascripts/discourse-common/addon/lib/icon-library.js @@ -113,7 +113,7 @@ function iconClasses(icon, params) { function warnIfMissing(id) { if (warnMissingIcons) { let iconList = Session.currentProp("svgIconList"); - if (iconList.indexOf(id) === -1) { + if (iconList && iconList.indexOf(id) === -1) { console.warn(`The icon "${id}" is missing from the SVG subset.`); // eslint-disable-line no-console } }