BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Infinite loop if UserStore can't find a user

Open milanpoliak opened this issue 8 months ago • 0 comments

Describe the bug If the UserStore does not contain a set of user IDs, it attempts to resolve them

Unless the resolver does not throw an error when it can't resolve a particular ID, update is emitted

The emitted update causes the useUsers hook to load the users again

It is probably a rare occasion, but nevertheless, it might happen and potentially freeze the app.

To Reproduce

  • visit the below Stackblitz
  • open the browser console
  • add a comment as John Doe
  • click onto the commented text to open the thread
  • see resolving being logged repeatedly

https://stackblitz.com/github/milanpoliak/BlockNote/tree/load-users-loop/examples/07-collaboration/04-comments?file=App.tsx

milanpoliak avatar Mar 20 '25 01:03 milanpoliak