@capillarytech/creatives-library 2.0.76 → 2.0.78

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.
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-case-declarations */
1
2
 
2
3
  /**
3
4
  *
@@ -32,6 +33,7 @@ const {CapRadioGroup} = CapRadio;
32
33
  // import { FormattedMessage } from 'react-intl';
33
34
  // import messages from './messages';
34
35
  const isUrl = (str) => {
36
+ // eslint-disable-next-line no-useless-escape
35
37
  const res = str.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
36
38
  return res;
37
39
  };
@@ -413,8 +415,11 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
413
415
  }
414
416
  }
415
417
  isValidExternalLink = ({obj, key}) => {
416
- const url = _.get(obj, key);
417
- return (url && url !== "" && isUrl(url));
418
+ if (key in obj) {
419
+ const url = _.get(obj, key);
420
+ return (url && url !== "" && isUrl(url));
421
+ }
422
+ return true;
418
423
  }
419
424
  /* eslint-disable */
420
425
  validateForm(tags, injectedTags, isSave, showMessages) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.76",
4
+ "version": "2.0.78",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",