Skip to content

Commit d90d0d9

Browse files
committed
add altText checking
1 parent 1f5997f commit d90d0d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/messages.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ class Messages {
138138
}
139139

140140
addButtons ({thumbnailImageUrl, altText, title, text, actions}) {
141+
if (!altText) {
142+
console.error('altText must not be empty.')
143+
return this
144+
}
141145
if (this._payload.length === 5) {
142146
console.error('Maximum payload length is 5.')
143147
return this

0 commit comments

Comments
 (0)