diff --git a/examples/tutorial/src/5-custom-attachment-type/App.tsx b/examples/tutorial/src/5-custom-attachment-type/App.tsx index 794bc476c..3cd1483ee 100644 --- a/examples/tutorial/src/5-custom-attachment-type/App.tsx +++ b/examples/tutorial/src/5-custom-attachment-type/App.tsx @@ -93,9 +93,7 @@ const App = () => { await channel.watch(); const hasProductMessage = channel.state.messages.some((message) => - message.attachments?.some( - (attachment) => 'type' in attachment && attachment.type === 'product', - ), + message.attachments?.some(isProductAttachment), ); if (!hasProductMessage) {