[RN] Avoid adding undefined in the invite

This commit is contained in:
Bettenbuk Zoltan 2019-03-05 19:45:56 +01:00 committed by Zoltan Bettenbuk
parent dbedee5e22
commit 27e1f5a1bc
1 changed files with 4 additions and 1 deletions

View File

@ -26,7 +26,10 @@ export function addLinkToCalendarEntry(
return new Promise((resolve, reject) => {
getShareInfoText(state, link, true).then(shareInfoText => {
RNCalendarEvents.findEventById(id).then(event => {
const updateText = `${event.description}\n\n${shareInfoText}`;
const updateText
= event.description
? `${event.description}\n\n${shareInfoText}`
: shareInfoText;
const updateObject = {
id: event.id,
...Platform.select({