@caring-dev/react-notion-x 7.7.6 → 7.7.7

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.
@@ -6137,12 +6137,12 @@ function CalendarWeekRow({
6137
6137
  measureCardHeights();
6138
6138
  });
6139
6139
  for (const cardElement of cardRefs.current) {
6140
- if (cardElement) {
6140
+ if (cardElement && cardElement instanceof Element) {
6141
6141
  resizeObserver.observe(cardElement);
6142
6142
  const collectionCard = cardElement.querySelector(
6143
6143
  ".notion-calendar-event-card"
6144
6144
  );
6145
- if (collectionCard) {
6145
+ if (collectionCard && collectionCard instanceof Element) {
6146
6146
  resizeObserver.observe(collectionCard);
6147
6147
  }
6148
6148
  }
@@ -6248,12 +6248,14 @@ function CalendarWeekRow({
6248
6248
  );
6249
6249
  for (const card of allCards) {
6250
6250
  const cardElement = card;
6251
- resizeObserver.observe(cardElement);
6252
- const collectionCard = cardElement.querySelector(
6253
- ".notion-calendar-event-card"
6254
- );
6255
- if (collectionCard) {
6256
- resizeObserver.observe(collectionCard);
6251
+ if (cardElement && cardElement instanceof Element) {
6252
+ resizeObserver.observe(cardElement);
6253
+ const collectionCard = cardElement.querySelector(
6254
+ ".notion-calendar-event-card"
6255
+ );
6256
+ if (collectionCard && collectionCard instanceof Element) {
6257
+ resizeObserver.observe(collectionCard);
6258
+ }
6257
6259
  }
6258
6260
  }
6259
6261
  if (weekRef.current) {