diff --git a/src/TextForEvent.js b/src/TextForEvent.js index 8d6ef41180..d75ef34c1c 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -250,8 +250,8 @@ function textForPowerEvent(event) { function textForWidgetEvent(event) { const senderName = event.sender ? event.sender.name : event.getSender(); - const previousContent = event.getPrevContent() ? event.getPrevContent() : {}; - const {name, type, url} = event.getContent() ? event.getContent() : {}; + const previousContent = event.getPrevContent() || {}; + const {name, type, url} = event.getContent() || {}; let widgetName = widgetName || name || type || previousContent.type || ''; // Apply sentence case