Skip to content

Commit

Permalink
fix topic script
Browse files Browse the repository at this point in the history
  • Loading branch information
aorcsik committed Feb 2, 2024
1 parent a717cc3 commit 22fbd89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/changelog-topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ function detectTopicFromUrl(url) {
const url = new URL(document.location.href);
const topicSlugId = detectTopicFromUrl(url);

ChangelogService.loadTopic(topicSlugId).then(topic => {
/** @type {string} */
const apiBase = document.location.hostname.match(/(localhost|127\.0\.0\.1)/) ? "" : "https://bitrise.io";
const changelogService = new ChangelogService(apiBase);

changelogService.loadTopic(topicSlugId).then(topic => {

document.getElementById("changelog-topic-title").innerHTML = topic.fancyTitle;
document.getElementById("changelog-topic-meta").innerHTML = topic.createdAt.toLocaleDateString();
Expand Down

0 comments on commit 22fbd89

Please sign in to comment.