Skip to content

Commit

Permalink
fix(shell): Undefined type bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timkinnane committed Sep 4, 2018
1 parent 7e441db commit 4b6eee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapters/shell.ts
Expand Up @@ -157,10 +157,10 @@ export class Shell extends bBot.MessageAdapter {
/** Add outgoing messages and re-render chat */
async dispatch (envelope: bBot.Envelope) {
for (let text of (envelope.strings || [])) {
this.messages.push([this.bot.settings.name, text])
if (text) this.messages.push([this.bot.settings.name, text])
}
for (let attachment of (envelope.payload.attachments || [])) {
if (attachment.fallback) {
if (attachment && attachment.fallback) {
this.messages.push([this.bot.settings.name, attachment.fallback])
}
}
Expand Down

0 comments on commit 4b6eee1

Please sign in to comment.