react-sync-board 1.2.5 → 1.2.6

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.
@@ -1124,8 +1124,16 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1124
1124
  const r = t.getBoundingClientRect();
1125
1125
  return nn(e, r);
1126
1126
  }, Ne = (e, t) => {
1127
- const n = e.getElementsByClassName(`item ${t}`)[0];
1128
- return n || console.error(`Missing item ${t}`), n;
1127
+ try {
1128
+ const n = e.getElementsByClassName(`item ${t}`)[0];
1129
+ return n || console.error(`Missing item ${t}`), n;
1130
+ } catch {
1131
+ console.error(
1132
+ `Error while getting item with id ${t} with wrapper`,
1133
+ e
1134
+ );
1135
+ return;
1136
+ }
1129
1137
  }, Te = (e) => {
1130
1138
  var r, n;
1131
1139
  const t = (r = e == null ? void 0 : e.dataset) == null ? void 0 : r.id;
@@ -1699,13 +1707,13 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1699
1707
  const p = a(), { boardWrapper: w, boardSize: m } = n(), S = p.reduce(
1700
1708
  (k, j) => {
1701
1709
  const M = Ne(w, j.id);
1702
- return k.left = Math.min(j.x, k.left), k.top = Math.min(j.y, k.top), k.right = Math.max(
1710
+ return M && (k.left = Math.min(j.x, k.left), k.top = Math.min(j.y, k.top), k.right = Math.max(
1703
1711
  j.x + M.offsetWidth,
1704
1712
  k.right
1705
1713
  ), k.bottom = Math.max(
1706
1714
  j.y + M.offsetHeight,
1707
1715
  k.bottom
1708
- ), k;
1716
+ )), k;
1709
1717
  },
1710
1718
  {
1711
1719
  left: m / 2,