소스 검색

[RN] Avoid adding undefined in the invite

j8
Bettenbuk Zoltan 6 년 전
부모
커밋
27e1f5a1bc
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4
    1
      react/features/calendar-sync/functions.native.js

+ 4
- 1
react/features/calendar-sync/functions.native.js 파일 보기

@@ -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({

Loading…
취소
저장