@sitecore-jss/sitecore-jss-nextjs 22.0.0-canary.13 → 22.0.0-canary.15

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.
@@ -44,6 +44,10 @@ const link_1 = __importDefault(require("next/link"));
44
44
  const sitecore_jss_react_1 = require("@sitecore-jss/sitecore-jss-react");
45
45
  exports.Link = (0, react_1.forwardRef)((props, ref) => {
46
46
  const { field, editable, children, internalLinkMatcher = /^\//g, showLinkTextWithChildrenPresent } = props, htmlLinkProps = __rest(props, ["field", "editable", "children", "internalLinkMatcher", "showLinkTextWithChildrenPresent"]);
47
+ if (!field ||
48
+ (!field.editable && !field.value && !field.href)) {
49
+ return null;
50
+ }
47
51
  const value = (field.href
48
52
  ? field
49
53
  : field.value);
@@ -15,6 +15,10 @@ import NextLink from 'next/link';
15
15
  import { Link as ReactLink, LinkPropTypes, } from '@sitecore-jss/sitecore-jss-react';
16
16
  export const Link = forwardRef((props, ref) => {
17
17
  const { field, editable, children, internalLinkMatcher = /^\//g, showLinkTextWithChildrenPresent } = props, htmlLinkProps = __rest(props, ["field", "editable", "children", "internalLinkMatcher", "showLinkTextWithChildrenPresent"]);
18
+ if (!field ||
19
+ (!field.editable && !field.value && !field.href)) {
20
+ return null;
21
+ }
18
22
  const value = (field.href
19
23
  ? field
20
24
  : field.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "22.0.0-canary.13",
3
+ "version": "22.0.0-canary.15",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -70,9 +70,9 @@
70
70
  "react-dom": "^18.2.0"
71
71
  },
72
72
  "dependencies": {
73
- "@sitecore-jss/sitecore-jss": "^22.0.0-canary.13",
74
- "@sitecore-jss/sitecore-jss-dev-tools": "^22.0.0-canary.13",
75
- "@sitecore-jss/sitecore-jss-react": "^22.0.0-canary.13",
73
+ "@sitecore-jss/sitecore-jss": "^22.0.0-canary.15",
74
+ "@sitecore-jss/sitecore-jss-dev-tools": "^22.0.0-canary.15",
75
+ "@sitecore-jss/sitecore-jss-react": "^22.0.0-canary.15",
76
76
  "node-html-parser": "^6.1.4",
77
77
  "prop-types": "^15.8.1",
78
78
  "regex-parser": "^2.2.11",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "description": "",
82
82
  "types": "types/index.d.ts",
83
- "gitHead": "740c521514b4c34ce4affe63fac57b7b82ff23ff",
83
+ "gitHead": "519f8ed6b6e87faa0af25a3d107ab9fd3b262740",
84
84
  "files": [
85
85
  "dist",
86
86
  "types",