Remove now unnecessary summary fallback

Ember Data 2.18 fixed the underlying bug
This commit is contained in:
Michael Lange 2018-03-28 15:12:52 -07:00
parent b7d833a5e0
commit bff7230642
1 changed files with 2 additions and 12 deletions

View File

@ -1,23 +1,13 @@
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import { alias } from '@ember/object/computed';
export default Component.extend({
store: service(),
job: null,
// TEMPORARY: https://github.com/emberjs/data/issues/5209
// The summary relationship can be broken under exact load
// order. This ensures that the summary is always shown, even
// if the summary link on the job is broken.
summary: computed('job.summary.content', function() {
const summary = this.get('job.summary');
if (summary.get('content')) {
return summary;
}
return this.get('store').peekRecord('job-summary', this.get('job.id'));
}),
summary: alias('job.summary'),
classNames: ['boxed-section'],
});