Remove now unnecessary summary fallback
Ember Data 2.18 fixed the underlying bug
This commit is contained in:
parent
b7d833a5e0
commit
bff7230642
|
@ -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'],
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue