From d860721571f89c36cd1c61b357a20456c81146b7 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 11 Oct 2021 16:03:09 -0700 Subject: [PATCH] fix reading PGHOST env var --- site/src/hooks.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/src/hooks.js b/site/src/hooks.js index d8ae65baaf..961fc5bb81 100644 --- a/site/src/hooks.js +++ b/site/src/hooks.js @@ -8,8 +8,7 @@ import { query } from './utils/db'; /** @type {import('@sveltejs/kit').Handle} */ export async function handle({ request, resolve }) { - - if (process.env.PGHOST) { + if (process.env['PGHOST']) { // this is a convenient time to clear out expired sessions query('delete from sessions where expiry < now()');