File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
app/preprints/my-preprints
lib/osf-components/addon/components/paginated-list/has-many Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1818 @model ={{ this.model }}
1919 @relationshipName =' preprints'
2020 @pageSize ={{ 10 }}
21+ @usePlaceholders ={{ false }}
2122 as |list|
2223 >
2324 <list .item as |preprint|>
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ export default class PaginatedHasMany extends BaseDataComponent {
3333 const model = await taskFor ( this . getModelTask ) . perform ( ) ;
3434 if ( this . usePlaceholders ) {
3535 await taskFor ( this . loadRelatedCountTask ) . perform ( reloading ) ;
36+ // Don't bother querying if we already know there's nothing there.
37+ if ( this . totalCount === 0 ) {
38+ return ;
39+ }
3640 }
3741 const items = await model . queryHasMany (
3842 this . relationshipName ,
You can’t perform that action at this time.
0 commit comments