Skip to content

Commit

Permalink
Merge tag '23.10.1' into develop
Browse files Browse the repository at this point in the history
Hotfix pagination links
  • Loading branch information
adlius committed Aug 29, 2023
2 parents 1c5d3ef + 5257e08 commit b7968c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/models/index-card-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ export default class IndexCardSearchModel extends Model {
relatedProperties!: RelatedPropertyPathModel[];

get firstPageCursor() {
if (this.searchResultPage.links.first?.href) {
if (this.searchResultPage.links?.first?.href) {
const firstPageLinkUrl = new URL(this.searchResultPage.links.first?.href);
return firstPageLinkUrl.searchParams.get('page[cursor]');
}
return null;
}

get prevPageCursor() {
if (this.searchResultPage.links.prev?.href) {
if (this.searchResultPage.links?.prev?.href) {
const prevPageLinkUrl = new URL(this.searchResultPage.links.prev?.href);
return prevPageLinkUrl.searchParams.get('page[cursor]');
}
return null;
}

get nextPageCursor() {
if (this.searchResultPage.links.next?.href) {
if (this.searchResultPage.links?.next?.href) {
const nextPageLinkUrl = new URL(this.searchResultPage.links.next?.href);
return nextPageLinkUrl.searchParams.get('page[cursor]');
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-osf-web",
"version": "23.10.0",
"version": "23.10.1",
"private": true,
"description": "Ember front-end for the Open Science Framework",
"homepage": "https://github.com/CenterForOpenScience/ember-osf-web#readme",
Expand Down

0 comments on commit b7968c9

Please sign in to comment.