@allxsmith/bestax-bulma 5.16.7 → 5.16.8

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.
package/dist/index.esm.js CHANGED
@@ -1383,7 +1383,22 @@ const Avatar = forwardRef(function Avatar(avatarProps, ref) {
1383
1383
  // Only forward link attributes when rendering an anchor or a custom (non-DOM)
1384
1384
  // component; a plain `as="div"` must not receive a stray `href`/`target`/`rel`.
1385
1385
  const isLinkLike = Tag === 'a' || typeof Tag !== 'string' || isCustomElement(Tag);
1386
- const linkProps = isLinkLike ? { href, target, rel } : {};
1386
+ // Present-only, not `{ href, target, rel }`. An unconditional spread hands the
1387
+ // target these keys whatever the caller passed, and a key existing is not free:
1388
+ // a target that tests for one sees a link where there is none, and one that
1389
+ // spreads its own `{...rest}` onward passes the nothing along. It is NOT about
1390
+ // a destructuring default, which an explicit `undefined` triggers just as an
1391
+ // absent key does. What stops a target that REQUIRES one from being rendered
1392
+ // without it is the type (#665) — this is the smaller half, and the backstop for
1393
+ // the callers a type does not reach: a plain-JavaScript one and a loose spread,
1394
+ // the same pair `Button` and `Menu.Item` keep their own filters for.
1395
+ const linkProps = isLinkLike
1396
+ ? {
1397
+ ...(href !== undefined && { href }),
1398
+ ...(target !== undefined && { target }),
1399
+ ...(rel !== undefined && { rel }),
1400
+ }
1401
+ : {};
1387
1402
  // alt coalesces with ?? (not ||) so an explicit alt="" survives as the
1388
1403
  // standard decorative marker instead of being overridden by name.
1389
1404
  const accessibleName = alt ?? name;