You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useEntityPresentation expects a valid entity reference I suppose and since the anonymous check is executed after then it gets passed the string 'anonymous' and crashes.
Moving the if (entityRef === 'anonymous') above useEntityPresentation works but the linter will complain about that since useEntityPresentation is a react hook.
Image of error:
I can create a PR with a possible fix.
The text was updated successfully, but these errors were encountered:
Anonymous questions and answers causes an error in Backstage if the person viewing the question is not the author of the question.
The culprit seems to be this line const { primaryTitle: userName } = useEntityPresentation(entityRef); in UserLink
useEntityPresentation
expects a valid entity reference I suppose and since the anonymous check is executed after then it gets passed the string 'anonymous' and crashes.Moving the
if (entityRef === 'anonymous')
aboveuseEntityPresentation
works but the linter will complain about that sinceuseEntityPresentation
is a react hook.Image of error:
I can create a PR with a possible fix.
The text was updated successfully, but these errors were encountered: