@domql/utils 2.5.147 → 2.5.148

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.
@@ -363,7 +363,7 @@ const deepDestringify = (obj, destringified = {}) => {
363
363
  };
364
364
  const stringToObject = (str, opts = { verbose: true }) => {
365
365
  try {
366
- return import_globals.window.eval("(" + str + ")");
366
+ return str ? import_globals.window.eval("(" + str + ")") : {};
367
367
  } catch (e) {
368
368
  if (opts.verbose)
369
369
  console.warn(e);
package/object.js CHANGED
@@ -404,7 +404,7 @@ export const deepDestringify = (obj, destringified = {}) => {
404
404
 
405
405
  export const stringToObject = (str, opts = { verbose: true }) => {
406
406
  try {
407
- return window.eval('(' + str + ')') // eslint-disable-line
407
+ return str ? window.eval('(' + str + ')') : {} // eslint-disable-line
408
408
  } catch (e) { if (opts.verbose) console.warn(e) }
409
409
  }
410
410
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.5.147",
3
+ "version": "2.5.148",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -25,7 +25,7 @@
25
25
  "build": "yarn build:cjs",
26
26
  "prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs"
27
27
  },
28
- "gitHead": "51d1a003e3d4eae96daa9eeed10e63bde2152f9d",
28
+ "gitHead": "6706914c73f3c9669ff443c0c890dea1f4e908ab",
29
29
  "devDependencies": {
30
30
  "@babel/core": "^7.12.0"
31
31
  }