Skip to content

Commit

Permalink
Merge pull request #36 from ML-Leonardo/fix/2080115903
Browse files Browse the repository at this point in the history
Fix for BCP: 2080115903
  • Loading branch information
JWandrocke authored and GitHub Enterprise committed Mar 2, 2020
2 parents 50ccbdf + 7c1ae42 commit 67f4a36
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/Message/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@ const ListElement = ({ title, subtitle, imageUrl, buttons, sendMessage }) => {
const buttonTitleMaxLength = 20

const button = propOr(null, 0, buttons)
if (!button) {
return null
}
// https://support.wdf.sap.corp/sap/support/message/2080115903 fix
// if (!button) {
// return null
// }

// https://sapjira.wdf.sap.corp/browse/SAPMLCONV-4781 - Support the pnonenumber options
const formattedTitle = truncate(button.title, buttonTitleMaxLength)
const telHref = button.value && button.value.indexOf('tel:') === 0 ? button.value : `tel:${button.value}`
const formattedTitle = !button ? null : truncate(button.title, buttonTitleMaxLength)
const telHref = () => {
if (!button) {
return null
}
return button.value && button.value.indexOf('tel:') === 0 ? button.value : `tel:${button.value}`
}
let content = null

switch (button.type) {
switch (button && button.type) {
case 'phonenumber':
content = (
<a
Expand Down

0 comments on commit 67f4a36

Please sign in to comment.