@bgd-labs/toolbox 0.0.34 → 0.0.36

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.
package/dist/index.mjs CHANGED
@@ -33342,7 +33342,10 @@ function getObjectDiff(obj1, obj2) {
33342
33342
  const diff = { before: {}, after: {} };
33343
33343
  if (typeof obj1 !== "object" || typeof obj2 !== "object")
33344
33344
  return { before: obj1, after: obj2 };
33345
- const allKeys = /* @__PURE__ */ new Set([...Object.keys(obj1), ...Object.keys(obj2)]);
33345
+ const allKeys = /* @__PURE__ */ new Set([
33346
+ ...Object.keys(obj1 || {}),
33347
+ ...Object.keys(obj2 || {})
33348
+ ]);
33346
33349
  for (const key of allKeys) {
33347
33350
  const val1 = obj1[key];
33348
33351
  const val2 = obj2[key];
@@ -33416,7 +33419,7 @@ async function formatBeforeAndAfter(change, formatInput) {
33416
33419
  change.after = await formatInput(change.after);
33417
33420
  }
33418
33421
  function primitiveReplacer(data, key) {
33419
- if (typeof data === "object") {
33422
+ if (data && typeof data === "object") {
33420
33423
  return Object.keys(data).reduce((acc, k) => {
33421
33424
  acc[k] = primitiveReplacer(acc[k], k);
33422
33425
  return acc;