Skip to content

Commit

Permalink
Merge pull request #585 from psarando/notifications-link-fix
Browse files Browse the repository at this point in the history
Check for null URLs in Notification message links
  • Loading branch information
psarando authored Aug 17, 2024
2 parents 5e65af0 + 58e30be commit 3ce0834
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/notifications/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ import RatingWidget from "components/apps/RatingWidget";
function MessageLink(props) {
const { message, href, as } = props;

return (
return href ? (
<Link href={href} as={as} passHref>
<DELink text={message} />
</Link>
) : (
message
);
}

Expand Down Expand Up @@ -141,7 +143,7 @@ function DataLink(props) {
const href =
path && getFolderPage(rootFolderAction ? path : getParentPath(path));

return href ? <MessageLink href={href} message={message} /> : message;
return <MessageLink href={href} message={message} />;
}

function TeamLink(props) {
Expand Down

0 comments on commit 3ce0834

Please sign in to comment.