UI: Fix check for Mirage presence setting up sockets (#7497)

Without this, exec UI doesn’t work at all in the binary. I made an
unfortunate error in not copying the environment check from
app/utils/fetch.js.
This commit is contained in:
Buck Doyle
2020-03-25 13:23:23 -05:00
committed by GitHub
parent 8fc7918978
commit 557f913899

View File

@@ -5,7 +5,9 @@ import { getOwner } from '@ember/application';
export default Service.extend({
getTaskStateSocket(taskState, command) {
const mirageEnabled =
config['ember-cli-mirage'] && config['ember-cli-mirage'].enabled !== false;
config.environment !== 'production' &&
config['ember-cli-mirage'] &&
config['ember-cli-mirage'].enabled !== false;
if (mirageEnabled) {
return new Object({