mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Remove discourse constants (#9958)
* DEV: `Discourse.baseUri` does not exist This never could have worked - should have been `Discourse.BaseUri` if anything. * DEV: Remove Discourse.Environment * DEV: Remove `Discourse.disableMissingIconWarning` * DEV: A bunch more missing environment checks
This commit is contained in:
@@ -2,7 +2,12 @@ import MultiSelectComponent from "select-kit/components/multi-select";
|
||||
import { computed } from "@ember/object";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { makeArray } from "discourse-common/lib/helpers";
|
||||
import { convertIconClass } from "discourse-common/lib/icon-library";
|
||||
import {
|
||||
convertIconClass,
|
||||
disableMissingIconWarning,
|
||||
enableMissingIconWarning
|
||||
} from "discourse-common/lib/icon-library";
|
||||
import { isDevelopment } from "discourse-common/config/environment";
|
||||
|
||||
export default MultiSelectComponent.extend({
|
||||
pluginApiIdentifiers: ["icon-picker"],
|
||||
@@ -13,8 +18,8 @@ export default MultiSelectComponent.extend({
|
||||
|
||||
this._cachedIconsList = null;
|
||||
|
||||
if (Discourse.Environment === "development") {
|
||||
Discourse.disableMissingIconWarning = true;
|
||||
if (isDevelopment()) {
|
||||
disableMissingIconWarning();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -75,8 +80,8 @@ export default MultiSelectComponent.extend({
|
||||
|
||||
this._cachedIconsList = null;
|
||||
|
||||
if (Discourse.Environment === "development") {
|
||||
delete Discourse.disableMissingIconWarning;
|
||||
if (isDevelopment()) {
|
||||
enableMissingIconWarning();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user