A platform for community discussion. Free, open, simple.
DEV: Do not trigger missing icon warning in icon picker
Penar Musaraj6253ddc74e3f
diff --git a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6 b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6index 2c2fd9043ff..b1f1d48829a 100644--- a/app/assets/javascripts/discourse-common/lib/icon-library.js.es6+++ b/app/assets/javascripts/discourse-common/lib/icon-library.js.es6@@ -573,6 +573,7 @@ function warnIfMissing(id) {if (typeof Discourse !== "undefined" &&Discourse.Environment === "development" &&+ !Discourse.disableMissingIconWarning &&Discourse.SvgIconList &&Discourse.SvgIconList.indexOf(id) === -1) {diff --git a/app/assets/javascripts/select-kit/components/icon-picker.js.es6 b/app/assets/javascripts/select-kit/components/icon-picker.js.es6index 48b7154a680..dfa074452e1 100644--- a/app/assets/javascripts/select-kit/components/icon-picker.js.es6+++ b/app/assets/javascripts/select-kit/components/icon-picker.js.es6@@ -12,6 +12,10 @@ export default MultiSelectComponent.extend({this._super(...arguments);this._cachedIconsList = null;++ if (Discourse.Environment === "development") {+ Discourse.disableMissingIconWarning = true;+ }},content: computed("value.[]", function() {@@ -70,6 +74,10 @@ export default MultiSelectComponent.extend({this._super(...arguments);this._cachedIconsList = null;++ if (Discourse.Environment === "development") {+ delete Discourse.disableMissingIconWarning;+ }},actions: {