Skip to content

Commit ce33b5f

Browse files
committed
tidy up
1 parent 4d94f71 commit ce33b5f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/components/goat-counter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const isProduction = process.env.NODE_ENV === 'production'
44

55
export default function GoatCounter() {
66
if (isProduction)
7-
if (window && window.location && !window.location.host.startsWith('localhost'))
7+
if (global && global.location && !global.location.host.startsWith('localhost')) // intentionally not using ?.
88
return <>
99
<script>{`
1010
window.goatcounter = {

src/templates/month-day.js

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export default function MonthDay({data, pageContext: {month, day}}) {
2929
const [isSparseLayout, setSparseLayout] = useState(false);
3030
useEffect(() => {
3131
setSparseLayout(global?.location?.search === '?ui=sparse') // TODO this is not very robust
32-
global?.console.log({isSparseLayout})
3332
}, []);
3433

3534
const dateObj = new Date(2000, month - 1, day); // note — JavaScript's Date object treats 0 = January, 11 = November...

0 commit comments

Comments
 (0)