From 8baa76a6a4a48e53ccc00fd2abe6048c890576e3 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 7 Jan 2024 12:57:56 -0500 Subject: [PATCH] fix: User.isUser() check for null Signed-off-by: Evan Prodromou --- index.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.mjs b/index.mjs index 3c649f1..022f79f 100644 --- a/index.mjs +++ b/index.mjs @@ -2168,6 +2168,9 @@ class User { } static async isUser (object) { + if (!object) { + return false + } const id = await object.id() const row = await db.get('SELECT actorId FROM user WHERE actorId = ?', [id]) return !!row