Parcourir la source

[RN] Avoid adding undefined in the invite

j8
Bettenbuk Zoltan il y a 6 ans
Parent
révision
27e1f5a1bc
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4
    1
      react/features/calendar-sync/functions.native.js

+ 4
- 1
react/features/calendar-sync/functions.native.js Voir le fichier

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

Chargement…
Annuler
Enregistrer