File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,16 @@ import mapValues from 'lodash/mapValues'
26
26
import { wrapAccessor } from './utils/accessors'
27
27
28
28
function viewNames ( _views ) {
29
- return ! Array . isArray ( _views ) ? Object . keys ( _views ) : _views
29
+ if ( Array . isArray ( _views ) ) {
30
+ return _views
31
+ }
32
+ const views = [ ]
33
+ for ( const [ key , value ] of Object . entries ( _views ) ) {
34
+ if ( value ) {
35
+ views . push ( key )
36
+ }
37
+ }
38
+ return views
30
39
}
31
40
32
41
function isValidView ( view , { views : _views } ) {
@@ -47,7 +56,7 @@ class Calendar extends React.Component {
47
56
* const localizer = globalizeLocalizer(globalize)
48
57
* ```
49
58
* moment
50
- * ``` js
59
+ * ``js
51
60
* import {momentLocalizer} from 'react-big-calendar'
52
61
* import moment from 'moment'
53
62
* // and, for optional time zone support
You can’t perform that action at this time.
0 commit comments