Skip to content

Commit

Permalink
Merge pull request #1670 from mrbarletta/patch-2
Browse files Browse the repository at this point in the history
fix(messenger): messages is not iterable
  • Loading branch information
rndlaine committed Apr 26, 2019
2 parents 3623044 + 31a2ad4 commit 1bf9bef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion modules/channel-messenger/src/backend/messenger.ts
Expand Up @@ -160,8 +160,13 @@ export class MessengerService {
debugMessages('could not find a bot for page id =', pageId)
continue
}

if (!messages || !messages.sender) {
return
}
for (const webhookEvent of messages) {
if (!webhookEvent.sender) {
return
}
debugMessages('incoming', webhookEvent)
const senderId = webhookEvent.sender.id

Expand Down
2 changes: 1 addition & 1 deletion src/bp/ui-studio/src/web/components/Layout/Sidebar.jsx
Expand Up @@ -51,7 +51,7 @@ class Sidebar extends React.Component {

renderModuleItem = module => {
const path = `/modules/${module.name}`
const iconPath = `/assets/module/${module.name}/icon.png`
const iconPath = `/assets/modules/${module.name}/icon.png`
const moduleIcon =
module.menuIcon === 'custom' ? (
<img className={classnames(style.customIcon, 'bp-custom-icon')} src={iconPath} />
Expand Down

0 comments on commit 1bf9bef

Please sign in to comment.