@copilotkit/react-core 2.0.0-rc.14 → 2.0.0-rc.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.
package/dist/headless.mjs CHANGED
@@ -1118,7 +1118,7 @@ function useInterrupt(config) {
1118
1118
  try {
1119
1119
  maybePromise = handler({
1120
1120
  event: legacyEvent,
1121
- interrupt: pending.kind === "standard" ? pending.interrupts[0] : null,
1121
+ interrupt: pending.kind === "standard" ? pending.interrupts[0] ?? null : null,
1122
1122
  interrupts: pending.kind === "standard" ? [...pending.interrupts] : [],
1123
1123
  resolve: resolveRef.current,
1124
1124
  cancel: cancelRef.current
@@ -1147,7 +1147,7 @@ function useInterrupt(config) {
1147
1147
  if (!isEnabled(legacyEvent)) return null;
1148
1148
  return renderRef.current({
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
  result: handlerResult,
1153
1153
  resolve,