From 8aa912c8855729335bf1daec82e39af113d63a9d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 20 Nov 2020 20:00:51 +0100 Subject: [PATCH] FIX: iconList is an array in production (#11308) This should be investigated further, but hopefully the comment will prevent anyone else to fall in this trap. --- .../javascripts/discourse-common/addon/lib/icon-library.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 3dba881c92f..2330de366c0 100644 --- a/app/assets/javascripts/discourse-common/addon/lib/icon-library.js +++ b/app/assets/javascripts/discourse-common/addon/lib/icon-library.js @@ -115,8 +115,9 @@ export function setIconList(iconList) { } export function isExistingIconId(id) { - // _iconList is actually an array as a string: '["foo", "bar"]' - return _iconList && _iconList.indexOf(`"${id}"`) >= 0; + // TODO: investigate why _iconList is actually an array as a string: '["foo", "bar"]' + // in local and a real array in production + return _iconList && _iconList.indexOf(id) >= 0; } function warnIfMissing(id) {