Skip to content

Commit

Permalink
fix: Prevent links from leaving page in edit - refs #254291
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 committed Jun 20, 2023
1 parent 3739bf2 commit 1f54dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StatisticBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const View = ({ data, mode }) => {
className={cx(textAlign, { 'ui container': styles.align === 'full' })}
>
{items.map((item, index) => {
const href = getFieldURL(item.href);
const href = mode !== 'edit' ? getFieldURL(item.href) : '#';
const StatisticWrapper = href ? UniversalLink : Statistic;
const valueNodes = serializeToNodes(item.value);
const valueNo = Number(serializeNodesToText(valueNodes));
Expand Down

0 comments on commit 1f54dc1

Please sign in to comment.