Skip to content

Commit

Permalink
fix: prevent link to leave site - refs #254291
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 committed Jun 20, 2023
1 parent 2b317ba commit 6ee7d6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TagsBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const View = ({ data, mode }) => {
const { items = [], title, position, showTagIcon } = data;

if (!items.length && mode === 'edit') return <p>Add Tag items</p>;

return (
<TagList position={position}>
<TagList.Title>{title}</TagList.Title>
Expand All @@ -15,7 +16,7 @@ const View = ({ data, mode }) => {
<TagList.Tag
className={item.class}
color={item.color || 'teal'}
href={item.href || '#'}
href={mode !== 'edit' && item.href ? item.href : '#'}
openLinkInNewTab={!!item.openLinkInNewTab}
showTagIcon={showTagIcon}
key={item.category}
Expand Down

0 comments on commit 6ee7d6c

Please sign in to comment.