Skip to content

Commit

Permalink
fix: User.isUser() check for null
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Prodromou <[email protected]>
  • Loading branch information
Evan Prodromou committed Jan 7, 2024
1 parent 4dd274f commit 8baa76a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8baa76a

Please sign in to comment.