DEV: Import ember ENV instead of Ember.testing (#8305)

This commit is contained in:
Mark VanLandingham
2019-11-07 11:20:35 -06:00
committed by GitHub
parent 60a235d128
commit 9ffdbf912f
32 changed files with 75 additions and 37 deletions

View File

@ -7,6 +7,7 @@ import {
} from "ember-addons/ember-computed-decorators";
import { iconHTML } from "discourse-common/lib/icon-library";
import { escape } from "pretty-text/sanitizer";
import ENV from "discourse-common/config/environment";
const MAX_COMPONENTS = 4;
@ -43,7 +44,7 @@ export default Component.extend({
animate(isInitial) {
const $container = $(this.element);
const $list = $(this.element.querySelector(".components-list"));
if ($list.length === 0 || Ember.testing) {
if ($list.length === 0 || ENV.environment === 'test') {
return;
}
const duration = 300;