@cntrl-site/sdk-nextjs 1.9.13-15 → 1.9.13-16

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.
@@ -111,7 +111,7 @@ class InteractionsRegistry {
111
111
  for (const interaction of this.interactions) {
112
112
  const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
113
113
  const matchingTrigger = interaction.triggers.find(trigger => ('position' in trigger && trigger.position === 0 && trigger.from === currentStateId)
114
- || (trigger.type === 'item-scroll-position' && this.items.find((item) => item.id === trigger.itemId).area[this.layoutId].top * window.innerWidth === 0 && trigger.from === currentStateId));
114
+ || (trigger.type === 'item-scroll-position' && this.items.find((item) => item.id === trigger.itemId) && trigger.from === currentStateId));
115
115
  if (!matchingTrigger)
116
116
  continue;
117
117
  const activeStateId = this.getActiveInteractionState(interaction.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "1.9.13-15",
3
+ "version": "1.9.13-16",
4
4
  "description": "SDK for Next.js",
5
5
  "author": "arsen@momdesign.nyc",
6
6
  "license": "MIT",
@@ -120,7 +120,7 @@ export class InteractionsRegistry implements InteractionsRegistryPort {
120
120
  const currentStateId = this.getCurrentStateByInteractionId(interaction.id);
121
121
  const matchingTrigger = interaction.triggers.find(trigger =>
122
122
  ('position' in trigger && trigger.position === 0 && trigger.from === currentStateId)
123
- || (trigger.type === 'item-scroll-position' && this.items.find((item) => item.id === trigger.itemId)!.area[this.layoutId].top * window.innerWidth === 0 && trigger.from === currentStateId)
123
+ || (trigger.type === 'item-scroll-position' && this.items.find((item) => item.id === trigger.itemId) && trigger.from === currentStateId)
124
124
  );
125
125
  if (!matchingTrigger) continue;
126
126
  const activeStateId = this.getActiveInteractionState(interaction.id);