DEV: Do not trigger missing icon warning in icon picker

This commit is contained in:
Penar Musaraj 2020-02-05 11:39:24 -05:00
parent f7c0cd1982
commit 6253ddc74e
2 changed files with 9 additions and 0 deletions

View File

@ -573,6 +573,7 @@ function warnIfMissing(id) {
if (
typeof Discourse !== "undefined" &&
Discourse.Environment === "development" &&
!Discourse.disableMissingIconWarning &&
Discourse.SvgIconList &&
Discourse.SvgIconList.indexOf(id) === -1
) {

View File

@ -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: {