Преглед на файлове

calendar-sync: fix loading calendar entries

Checking if the calendar support in the reducer is not only useless but wrong,
since we don't have access to the entire store (the calendar support is checked
in the base/config feature). If calendar support is not enabled the actions
being reduced won't be dispatched anyway, so no harm is done by removing the
check.
master
Saúl Ibarra Corretgé преди 6 години
родител
ревизия
ca11cbf6cc
променени са 1 файла, в които са добавени 0 реда и са изтрити 5 реда
  1. 0
    5
      react/features/calendar-sync/reducer.js

+ 0
- 5
react/features/calendar-sync/reducer.js Целия файл

13
     SET_CALENDAR_PROFILE_EMAIL,
13
     SET_CALENDAR_PROFILE_EMAIL,
14
     SET_LOADING_CALENDAR_EVENTS
14
     SET_LOADING_CALENDAR_EVENTS
15
 } from './actionTypes';
15
 } from './actionTypes';
16
-import { isCalendarEnabled } from './functions';
17
 
16
 
18
 /**
17
 /**
19
  * The default state of the calendar feature.
18
  * The default state of the calendar feature.
50
 });
49
 });
51
 
50
 
52
 ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
51
 ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
53
-    if (!isCalendarEnabled(state)) {
54
-        return state;
55
-    }
56
-
57
     switch (action.type) {
52
     switch (action.type) {
58
     case CLEAR_CALENDAR_INTEGRATION:
53
     case CLEAR_CALENDAR_INTEGRATION:
59
         return DEFAULT_STATE;
54
         return DEFAULT_STATE;

Loading…
Отказ
Запис