mirror of
https://github.com/discourse/discourse.git
synced 2026-07-31 16:48:26 -05:00
FIX: Handle edge case in UserPostsStream#findItems when loading (#35952)
Avoid throwing an error in `UserPostsStream#findItems` if already loading or unable to load more items. This improves resilience and prevents potential uncaught exceptions during certain edge cases in user post streams.
This commit is contained in:
@@ -34,7 +34,7 @@ export default class UserPostsStream extends EmberObject {
|
||||
|
||||
async findItems() {
|
||||
if (this.loading || !this.canLoadMore) {
|
||||
throw new Error();
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
|
||||
Reference in New Issue
Block a user