Skip to content

Commit

Permalink
web: don't fail when name.text is undefined (#261)
Browse files Browse the repository at this point in the history
The check here is that `node.name` can be undefined; we then know
that the node is private.  But `node.name.text` can be undefined,
and that should also not throw an exception at this check.
I've added a small check to ensure this won't throw.
  • Loading branch information
kensternberg-authentik authored Jul 8, 2024
1 parent a61e373 commit 60df377
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function handleModifiers(doc, node) {
}
});

if (node.name?.text.startsWith('#')) {
if (node.name?.text?.startsWith('#')) {
doc.privacy = 'private';
}

Expand Down

0 comments on commit 60df377

Please sign in to comment.