DEV: allows to check if an icon is in the set (#11303)

DEV: allows to check if an icon is in the set (#11303)

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 376fbce..3dba881 100644
--- a/app/assets/javascripts/discourse-common/addon/lib/icon-library.js
+++ b/app/assets/javascripts/discourse-common/addon/lib/icon-library.js
@@ -114,8 +114,13 @@ export function setIconList(iconList) {
   _iconList = iconList;
 }
 
+export function isExistingIconId(id) {
+  // _iconList is actually an array as a string: '["foo", "bar"]'
+  return _iconList && _iconList.indexOf(`"${id}"`) >= 0;
+}
+
 function warnIfMissing(id) {
-  if (warnMissingIcons && _iconList && _iconList.indexOf(id) === -1) {
+  if (warnMissingIcons && !isExistingIconId(id)) {
     console.warn(`The icon "${id}" is missing from the SVG subset.`); // eslint-disable-line no-console
   }
 }
diff --git a/app/assets/javascripts/discourse/app/lib/plugin-api.js b/app/assets/javascripts/discourse/app/lib/plugin-api.js
index 4e20729..34b30d1 100644
--- a/app/assets/javascripts/discourse/app/lib/plugin-api.js
+++ b/app/assets/javascripts/discourse/app/lib/plugin-api.js
@@ -67,7 +67,7 @@ import {
 } from "discourse/models/user";
 
 // If you add any methods to the API ensure you bump up this number
-const PLUGIN_API_VERSION = "0.11.0";
+const PLUGIN_API_VERSION = "0.11.1";
 
 class PluginApi {
   constructor(version, container) {

GitHub sha: 8a90a561

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