Skip to content

Commit 769881e

Browse files
committed
fix: patch up fetch issue
1 parent de5c432 commit 769881e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/community/releases.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@ You can find the latest stable release of Leaf on our [GitHub page](https://gith
4040
```
4141

4242
<script>
43-
fetch("https://api.github.com/repos/leafsphp/leaf/releases/latest")
43+
if (typeof fetch !== "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)