Skip to content

Commit

Permalink
ai: fix missing binding error (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
threepointone committed Apr 19, 2024
1 parent 83fec4f commit 2f7a2e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/light-pans-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"partykit-ai": patch
---

ai: fix missing binding error
2 changes: 1 addition & 1 deletion packages/partykit-ai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Ai extends CFAi {
throw new Error("You should pass room.context.ai as the first argument");
}
const { binding, ...rest } = options;
super(binding, {
super(binding || {}, {
...rest
});
}
Expand Down

0 comments on commit 2f7a2e6

Please sign in to comment.