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