@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.js CHANGED
@@ -33442,7 +33442,10 @@ function getObjectDiff(obj1, obj2) {
33442
33442
  const diff = { before: {}, after: {} };
33443
33443
  if (typeof obj1 !== "object" || typeof obj2 !== "object")
33444
33444
  return { before: obj1, after: obj2 };
33445
- const allKeys = /* @__PURE__ */ new Set([...Object.keys(obj1), ...Object.keys(obj2)]);
33445
+ const allKeys = /* @__PURE__ */ new Set([
33446
+ ...Object.keys(obj1 || {}),
33447
+ ...Object.keys(obj2 || {})
33448
+ ]);
33446
33449
  for (const key of allKeys) {
33447
33450
  const val1 = obj1[key];
33448
33451
  const val2 = obj2[key];
@@ -33516,7 +33519,7 @@ async function formatBeforeAndAfter(change, formatInput) {
33516
33519
  change.after = await formatInput(change.after);
33517
33520
  }
33518
33521
  function primitiveReplacer(data, key) {
33519
- if (typeof data === "object") {
33522
+ if (data && typeof data === "object") {
33520
33523
  return Object.keys(data).reduce((acc, k) => {
33521
33524
  acc[k] = primitiveReplacer(acc[k], k);
33522
33525
  return acc;