Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Fix announcer say method for message undefined or null.
Browse files Browse the repository at this point in the history
RELNOTES: n/a

PiperOrigin-RevId: 297207505
  • Loading branch information
Closure Team authored and kjin committed Feb 26, 2020
1 parent 1c85fbc commit 3b9a16d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion closure/goog/a11y/aria/announcer.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ goog.a11y.aria.Announcer.prototype.say = function(message, opt_priority) {
const announceMessage = this.lastMessageAnnounced_ === message ?
message + goog.string.Unicode.NBSP :
message;
if (!goog.string.isEmptyString(message)) {
if (message) {
this.lastMessageAnnounced_ = announceMessage;
}
goog.dom.setTextContent(liveRegion, announceMessage);
Expand Down

0 comments on commit 3b9a16d

Please sign in to comment.