Skip to content

Commit 7aee5d8

Browse files
committed
rev: fix when missing build rev
1 parent 5e3c366 commit 7aee5d8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/layouts/Layout.astro

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Font } from "astro:assets";
33
import "../styles/global.css";
44
const year = new Date().getFullYear();
5-
const rev = import.meta.env.GIT_REV || "[object Object]";
5+
const rev = import.meta.env.GIT_REV;
66
---
77

88
<!doctype html>
@@ -75,9 +75,10 @@ const rev = import.meta.env.GIT_REV || "[object Object]";
7575
<a
7676
target="_blank"
7777
rel="noopener"
78-
href={"https://github.com/drawbu/drawbu.dev/tree/" + rev}
78+
href={"https://github.com/drawbu/drawbu.dev/tree/" +
79+
(rev || "HEAD")}
7980
>
80-
{rev.substring(0, 8)}
81+
{rev?.substring(0, 8) || "[object Object]"}
8182
</a>
8283
</p>
8384
</footer>

0 commit comments

Comments
 (0)