@bento-core/table 1.0.1-ins.1 → 1.0.1-ins.2

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.
@@ -20,7 +20,12 @@ const ExternalLinkView = _ref => {
20
20
  rootPath,
21
21
  pathParams
22
22
  } = column === null || column === void 0 ? void 0 : column.linkAttr;
23
- const url = pathParams.map(attr => "".concat(rootPath, "/").concat(row[attr]));
23
+ const url = pathParams.map(attr => {
24
+ if (!rootPath) {
25
+ return row[attr];
26
+ }
27
+ return "".concat(rootPath, "/").concat(row[attr]);
28
+ });
24
29
  const externalLinkIcon = {
25
30
  src: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/bento/images/icons/svgs/externalLinkIcon.svg',
26
31
  alt: 'External link icon'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ins.1",
3
+ "version": "1.0.1-ins.2",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
@@ -12,7 +12,12 @@ const ExternalLinkView = ({
12
12
  row,
13
13
  }) => {
14
14
  const { rootPath, pathParams } = column?.linkAttr;
15
- const url = pathParams.map((attr) => `${rootPath}/`.concat(row[attr]));
15
+ const url = pathParams.map((attr) => {
16
+ if (!rootPath) {
17
+ return row[attr];
18
+ }
19
+ return `${rootPath}/`.concat(row[attr]);
20
+ });
16
21
  const externalLinkIcon = {
17
22
  src: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/bento/images/icons/svgs/externalLinkIcon.svg',
18
23
  alt: 'External link icon',