-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Trying to access chatMessages before data present #9038
Copy link
Copy link
Closed
Labels
area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interactionRelated to UI/UX, frontend code, accessibility, and user interactiontype: bug
Description
Description:
Occasionally you'll reload and you'll just get a white screen. Some times it'll take several reloads before it loads the page.
Boils down to this:
[Error] TypeError: undefined is not an object (evaluating 'chatMessages[u.openedRoom].input')
(anonymous function)
This makes sense. Basically onRendered in this template is called before chatMessages has even been defined or populated.
Some times data loading is fast enough that this doesn't happen. But when there is a slight delay the data isn't there in time.
Server Setup Information:
- Version of Rocket.Chat Server: 0.59.0+
Steps to Reproduce:
- Put server under some load
- Refresh like mad
- Hope the condition hits.
Expected behavior:
Should either wait for this data... or should at least verify there before trying to access it.
Actual behavior:
Blank page
Relevant logs:
[Error] TypeError: undefined is not an object (evaluating 'chatMessages[u.openedRoom].input')
(anonymous function) (f79e342366a21ea0345d878e108dbcceb4008c06.js:245:54875)
Reactions are currently unavailable
Metadata
Metadata
Labels
area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interactionRelated to UI/UX, frontend code, accessibility, and user interactiontype: bug