Skip to content

Commit

Permalink
fix(events): author rendering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DharmapalP committed Dec 5, 2024
1 parent 7f9ff75 commit 0d80e02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion blocks/events/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ const toggleFilterAccordion = (toggle) => {

export default async function decorate(block) {
const env = getEnvironment();
const domain = getEnvironmentDomain(env) + GRAPHQL_ENDPOINT_PATH;
let domain;
if (!env) {
domain = getEnvironmentDomain(env) + GRAPHQL_ENDPOINT_PATH;
} else {
domain = window.location.host + GRAPHQL_ENDPOINT_PATH;
}
const fetchUrl = `https://${domain}`;
fetch(fetchUrl, {
method: 'GET',
Expand Down

0 comments on commit 0d80e02

Please sign in to comment.