Skip to content

Commit 5ac1a61

Browse files
committed
Merge branch 'staging'
2 parents 0a0128f + 6d5afae commit 5ac1a61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/community/releases.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ You can find the latest stable release of Leaf on our [GitHub page](https://gith
3939
```markdown:no-line-numbers
4040
```
4141

42-
<script>
43-
fetch("https://api.github.com/repos/leafsphp/leaf/releases/latest")
42+
<script setup>
43+
if (typeof window !== "undefined") {
44+
fetch("https://api.github.com/repos/leafsphp/leaf/releases/latest")
4445
.then(res => res.json())
4546
.then(data => {
4647
// get item with class language-md
4748
document.querySelector(".language-markdown").childNodes.item(2).innerHTML = `<code># ${data.name}</code>\n<code>${data.body}</code>`;
4849
// innerHTML = ` - ${new Date(data.published_at).toLocaleDateString()} ${data.body}`;
4950
});
51+
}
5052
</script>
5153

5254
## Latest Leaf MVC Release

0 commit comments

Comments
 (0)