diff --git a/Documentation/FAQs.md b/Documentation/FAQs.md index 05ca1070..2bfa657f 100644 --- a/Documentation/FAQs.md +++ b/Documentation/FAQs.md @@ -51,7 +51,7 @@ then get the `MessageType` for this cell through the `MessagesDataSource` method ```Swift func didTapMessage(in cell: MessageCollectionViewCell) { - guard let indexPath = cell.indexPath(for: cell) else { return } + guard let indexPath = messagesCollectionView.indexPath(for: cell) else { return } guard let messagesDataSource = messagesCollectionView.messagesDataSource else { return } let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView) }