@domql/utils 2.29.84 → 2.29.85

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.
@@ -429,7 +429,7 @@ const stringToObject = (str, opts = { verbose: true }) => {
429
429
  return str ? import_globals.window.eval("(" + str + ")") : {};
430
430
  } catch (e) {
431
431
  if (opts.verbose) console.warn(e);
432
- if (opts.errorCallback) opts.errorCallback(e);
432
+ if (opts.errorCallback) return opts.errorCallback(e);
433
433
  }
434
434
  };
435
435
  const diffObjects = (original, objToDiff, cache, opts) => {
@@ -398,7 +398,7 @@ const stringToObject = (str, opts = { verbose: true }) => {
398
398
  return str ? window.eval("(" + str + ")") : {};
399
399
  } catch (e) {
400
400
  if (opts.verbose) console.warn(e);
401
- if (opts.errorCallback) opts.errorCallback(e);
401
+ if (opts.errorCallback) return opts.errorCallback(e);
402
402
  }
403
403
  };
404
404
  const diffObjects = (original, objToDiff, cache, opts) => {
package/object.js CHANGED
@@ -151,8 +151,8 @@ export const deepClone = (obj, options = {}) => {
151
151
  ? new contentWindow.Array()
152
152
  : new contentWindow.Object()
153
153
  : isArray(obj)
154
- ? []
155
- : {}
154
+ ? []
155
+ : {}
156
156
 
157
157
  // Store the clone to handle circular references
158
158
  visited.set(obj, clone)
@@ -490,7 +490,7 @@ export const stringToObject = (str, opts = { verbose: true }) => {
490
490
  return str ? window.eval('(' + str + ')') : {} // eslint-disable-line
491
491
  } catch (e) {
492
492
  if (opts.verbose) console.warn(e)
493
- if (opts.errorCallback) opts.errorCallback(e)
493
+ if (opts.errorCallback) return opts.errorCallback(e)
494
494
  }
495
495
  }
496
496
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.29.84",
3
+ "version": "2.29.85",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -24,7 +24,7 @@
24
24
  "build": "npx rimraf -I dist; npm run build:cjs; npm run build:esm",
25
25
  "prepublish": "npm run build; npm run copy:package:cjs"
26
26
  },
27
- "gitHead": "c5fa9ccd6a9d90be40c3f530e512dea970e7bb68",
27
+ "gitHead": "1b59a8173275f34b13c1aba7a43073401f46989b",
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.27.1"
30
30
  }