From 00e43ddc0bf3d6dd719fc9295d156567fa2fecfb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 26 Aug 2024 16:28:30 -0700 Subject: switch to bun --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/utils.js') diff --git a/lib/utils.js b/lib/utils.js index f53b76d2..ada32521 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -70,7 +70,7 @@ export let fields = [ export let getUser = async (username) => { if (username === "undefined") fail("invalid user"); let user = await migrate(username); - if (!user.nwc) { + if (user && !user.nwc) { user.nwc = bytesToHex(randomBytes(32)); s(`user:${user.id}`, user); } -- cgit v1.2.3