MDL-57139 messages/notifications: ensure promise best practices
authorDan Poltawski <dan@moodle.com>
Tue, 10 Jan 2017 10:10:56 +0000 (10:10 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 1 Jun 2017 09:27:58 +0000 (10:27 +0100)
commit877d997fe13c5885e4414e79cdeaaaa363d43e2b
tree07b1df5193bdc52650bc4e0800065c7f18a88508
parent66a91ddada35313602005c65c188781a2337cf0a
MDL-57139 messages/notifications: ensure promise best practices

Previously there were a few issues with the code

* We were capturing a promise without then then .then() that came after
  it, so our promise wouldn't always be completely resolved by the time
  then next piece of code was operating on it

* We weren't catching all errors with .catch()
message/amd/src/message_area_messages.js
message/amd/src/message_area_search.js
message/output/popup/amd/src/message_popover_controller.js
message/output/popup/amd/src/notification_area_control_area.js
message/output/popup/amd/src/notification_popover_controller.js