Skip to content

Conversation

@dkundel
Copy link
Contributor

@dkundel dkundel commented Feb 16, 2024

The example to use replicate.stream was wrongly checking the event type and was not producing any output. I adjusted the example so that it works. The event && in front of the event.event === 'output' check seems unnecessary as I can't think of a scenario where event would be false-y and even event.event seems to always be of type string but I left it for now in case I'm missing something.

The example to use replicate.stream was wrongly checking the event type and was not producing any output.
@mattt
Copy link
Contributor

mattt commented Feb 16, 2024

Related to #197

Copy link
Contributor

@mattt mattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening a PR, @dkundel!

I'm happy to merge this in as-is. But for your consideration, I made some suggestions to use destructuring to avoid the event.event awkwardness. WDYT?

dkundel and others added 3 commits February 16, 2024 13:59
Co-authored-by: Mattt <[email protected]>
Co-authored-by: Mattt <[email protected]>
Removing the console.dir since it's no longer relevant
@dkundel
Copy link
Contributor Author

dkundel commented Feb 16, 2024

Looks good to me! I did remove the console.dir({event}) since it no longer felt relevant.

@mattt
Copy link
Contributor

mattt commented Feb 16, 2024

Excellent. Thanks again for your help with this, @dkundel! Merging now.

@mattt mattt merged commit d09067c into replicate:main Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants