From 1f54dc1c1708d46d69567ae66f5f249b95d5d6c8 Mon Sep 17 00:00:00 2001 From: dobri1408 <50819975+dobri1408@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:56:11 +0300 Subject: [PATCH] fix: Prevent links from leaving page in edit - refs #254291 --- src/StatisticBlock/View.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StatisticBlock/View.jsx b/src/StatisticBlock/View.jsx index e3c8d66..dbc966e 100644 --- a/src/StatisticBlock/View.jsx +++ b/src/StatisticBlock/View.jsx @@ -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));