@redneckz/wildless-cms-uni-blocks 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -702,12 +702,16 @@
702
702
  const blockRouter = useBlockRouter();
703
703
  return (props) => ({
704
704
  ...props,
705
- href: projectSettings.BASE_PATH && props.href && !(isRemote || isURL(props.href))
706
- ? joinPath(projectSettings.BASE_PATH, props.href)
707
- : props.href,
705
+ href: adjustHref(props.href),
708
706
  'aria-label': props.text,
709
707
  onClick: handlerDecorator(handleHref(props), props),
710
708
  });
709
+ function adjustHref(href) {
710
+ const isRelativeToBase = !isRemote && href?.startsWith('/');
711
+ return projectSettings.BASE_PATH && href && isRelativeToBase
712
+ ? joinPath(projectSettings.BASE_PATH, href)
713
+ : href;
714
+ }
711
715
  function handleHref({ href, target, onClick }) {
712
716
  return (ev) => {
713
717
  onClick && onClick(ev);
@@ -4553,7 +4557,7 @@
4553
4557
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
4554
4558
  }
4555
4559
 
4556
- const packageVersion = "0.8.6";
4560
+ const packageVersion = "0.8.7";
4557
4561
 
4558
4562
  exports.Blocks = Blocks;
4559
4563
  exports.ContentPage = ContentPage;