@copilotkit/react-core 2.0.0-rc.13 → 2.0.0-rc.15

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/headless.cjs CHANGED
@@ -1147,7 +1147,7 @@ function useInterrupt(config) {
1147
1147
  try {
1148
1148
  maybePromise = handler({
1149
1149
  event: legacyEvent,
1150
- interrupt: pending.kind === "standard" ? pending.interrupts[0] : null,
1150
+ interrupt: pending.kind === "standard" ? pending.interrupts[0] ?? null : null,
1151
1151
  interrupts: pending.kind === "standard" ? [...pending.interrupts] : [],
1152
1152
  resolve: resolveRef.current,
1153
1153
  cancel: cancelRef.current
@@ -1176,7 +1176,7 @@ function useInterrupt(config) {
1176
1176
  if (!isEnabled(legacyEvent)) return null;
1177
1177
  return renderRef.current({
1178
1178
  event: legacyEvent,
1179
- interrupt: pending.kind === "standard" ? pending.interrupts[0] : null,
1179
+ interrupt: pending.kind === "standard" ? pending.interrupts[0] ?? null : null,
1180
1180
  interrupts: pending.kind === "standard" ? [...pending.interrupts] : [],
1181
1181
  result: handlerResult,
1182
1182
  resolve,