handle undefined values, clarify comment

This commit is contained in:
Tom (plebeius.eth)
2024-06-15 12:37:45 +02:00
parent efc9a98f47
commit cadddcb4c5
4 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ const useStateString = (commentOrSubplebbit: CommentOrSubplebbit): string | unde
if (commentOrSubplebbit?.publishingState && commentOrSubplebbit?.publishingState !== 'stopped' && commentOrSubplebbit?.publishingState !== 'succeeded') {
stateString = commentOrSubplebbit.publishingState;
} else if (commentOrSubplebbit?.updatingState !== 'stopped' && commentOrSubplebbit?.updatingState !== 'succeeded') {
stateString = commentOrSubplebbit.updatingState;
stateString = commentOrSubplebbit?.updatingState;
}
if (stateString) {
stateString = stateString.replaceAll('-', ' ').replace('ipfs', 'IPFS').replace('ipns', 'IPNS');