Skip to content

Commit d8d74e6

Browse files
committed
Auto merge of #2489 - Turbo87:index-task, r=pichfl
index: Fix broken summary request caching logic This didn't quite work as intended... 😅 r? @pichfl
2 parents f7d496e + f69b423 commit d8d74e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default Controller.extend({
1111
model: readOnly('dataTask.lastSuccessful.value'),
1212

1313
hasData: computed('dataTask.{lastSuccessful,isRunning}', function () {
14-
return this.get('dataTask.lastSuccessful') || !this.get('dataTask.isRunning');
14+
return this.get('dataTask.lastSuccessful') && !this.get('dataTask.isRunning');
1515
}),
1616

1717
dataTask: task(function* () {

app/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default Route.extend({
1717
},
1818

1919
setupController(controller) {
20-
if (!controller.dataTask.hasData) {
20+
if (!controller.hasData) {
2121
let promise = controller.dataTask.perform();
2222
if (this.fastboot.isFastBoot) {
2323
this.fastboot.deferRendering(promise);

0 commit comments

Comments
 (0)