FIX: iconList is an array in production (#11308)

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.

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 3dba881..2330de3 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) {

GitHub sha: 8aa912c8

This commit appears in #11308 which was approved by pmusaraj. It was merged by jjaffeux.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/the-icon-step-forward-is-missing-from-the-svg-subset/170966/2