react-native-activity-feed icon indicating copy to clipboard operation
react-native-activity-feed copied to clipboard

Non-iterable TypeError when adding 3rd tier comment

Open vosters opened this issue 5 years ago • 0 comments

SETUP

  • iOS
  • "react-native": "^0.62.2",
  • "react": "^16.13.1",
  • "react-native-activity-feed": "^0.9.1",
  • "getstream": "^6.2.0",

Describe the bug When I submit to add a 3rd tier comment, I receive the following TypeError. The comment has been added despite this error, but only displays if I refresh the app. This error only occurs when I add the first 3rd tier reply on the chain. After refresh, I am able to add more 3rd tier comments without issue.

Following the trace in Feed.js, I found that getReactionPaths function returns undefined from this.state.reactionIdToPaths[reactionId].

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) at _createForOfIteratorHelper (Feed.js:54) at Feed.js:498 at FeedManager.setState (Feed.js:96) at _callee4$ (Feed.js:495) at tryCatch (runtime.js:45) at Generator.invoke [as _invoke] (runtime.js:274) at Generator.prototype. [as next] (runtime.js:97) at asyncGeneratorStep (asyncToGenerator.js:3) at _next (asyncToGenerator.js:25) at tryCallOne (core.js:37)

To Reproduce Steps to reproduce the behavior:

  1. Add a comment to an activity
  2. Reply to the initial comment
  3. Reply to the Reply.
  4. Receive TypeError shown above.
  5. Refresh and the 3rd tier comment will be displayed.

Expected behavior Comment added and displayed on the ReactionList

vosters avatar Oct 30 '20 14:10 vosters