Steps to repro:
-
On a vanilla instance with a new user, start to compose your first message.
-
The
education.new_topiccomposer message will appear. Dismiss it. -
Write until the draft process is triggered and the draft saves.
-
Refresh the page. The composer will re-open with your draft.
-
An exception will be thrown.
_findMessagesattempts to add the welcome message toqueuedForTyping, which isnullat the time it is assigned.
The issue is with the sequence of reseting queuedForTyping and initialising the async find for composer messages, see the console.log in the screenshot.
One simple fix is to move the queuedForTyping assignment inside the then block of the composer-messages lookup, however I think there’s still race conditions with that solution. Nevertheless, that’s all I have time for right now…
