Skip to content

Commit

Permalink
Latest Issue Block: fix missing site subpath
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbrown-io committed Nov 12, 2024
1 parent 2f4991d commit 76b9c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/ucb-latest-issue-block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class LatestIssueElement extends HTMLElement {
constructor() {
super();

const baseURL = this.getAttribute("baseURL");
const handleError = response => {
if (!response.ok) {
throw new Error;
Expand All @@ -10,7 +10,7 @@ class LatestIssueElement extends HTMLElement {
}
};

fetch(`/jsonapi/node/ucb_issue?include=field_ucb_issue_cover_image.field_media_image&fields[file--file]=uri,url&filter[published][group][conjunction]=AND&filter[publish-check][condition][path]=status&filter[publish-check][condition][value]=1&filter[publish-check][condition][memberOf]=published&page[limit]=4&sort=-created`)
fetch(`${baseURL}/jsonapi/node/ucb_issue?include=field_ucb_issue_cover_image.field_media_image&fields[file--file]=uri,url&filter[published][group][conjunction]=AND&filter[publish-check][condition][path]=status&filter[publish-check][condition][value]=1&filter[publish-check][condition][memberOf]=published&page[limit]=4&sort=-created`)
.then(handleError)
.then((data) => this.build(data))
.catch(Error=> {
Expand Down

0 comments on commit 76b9c94

Please sign in to comment.