mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: Import ember ENV instead of Ember.testing (#8305)
This commit is contained in:

committed by
GitHub

parent
60a235d128
commit
9ffdbf912f
@ -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;
|
||||
|
Reference in New Issue
Block a user