Skip to content

Commit 57287ca

Browse files
committed
[smarcet] - #13211
* fixed icalendar js bug
1 parent b9e0ef4 commit 57287ca

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

summit/ui/source/js/actions/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ const getDefaultViewDay = () => {
336336

337337
const errorHandler = (err, res) => {
338338
let text = res.body;
339-
if(res.body.messages instanceof Array) {
339+
if(res.body != null && res.body.messages instanceof Array) {
340340
let messages = res.body.messages.map( m => {
341341
if (m instanceof Object) return m.message
342342
else return m;
@@ -358,7 +358,7 @@ export const unSyncCalendar = () => {
358358
)();
359359
}
360360

361-
export const syncCalendar = (cal_type, ios_user, ios_pass ) => {
361+
export const syncCalendar = (cal_type, ios_user, ios_pass ) => (dispatch) => {
362362
let summit_id = ScheduleProps.summit.id;
363363
console.log(`syncCalendar - cal_type ${cal_type}`);
364364
switch (cal_type) {
@@ -369,10 +369,10 @@ export const syncCalendar = (cal_type, ios_user, ios_pass ) => {
369369
return putRequest(
370370
createAction(''),
371371
createAction(CALENDAR_SYNCD),
372-
`summit-calendar-sync/login-apple?state=${summit_id}`,
372+
'summit-calendar-sync/login-apple',
373373
{ios_user: ios_user, ios_pass: ios_pass},
374374
errorHandler
375-
)();
375+
)({state : summit_id})(dispatch);
376376
break;
377377
case 'outlook':
378378
window.location = `summit-calendar-sync/login-outlook?state=${summit_id}`;

ui-core/ui/source/js/utils/actions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export const putRequest = (
7777
payload,
7878
errorHandler
7979
) => params => dispatch => {
80+
console.log(`endpoint ${endpoint}`);
8081
let url = URI(endpoint).query(params).toString();
82+
console.log(`url ${url}`);
8183
dispatch(requestActionCreator(params));
8284
const req = http.put(url)
8385
.send(payload)

0 commit comments

Comments
 (0)