File tree 4 files changed +6
-6
lines changed
src/client/components/facet_results 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class ApexChart extends React.Component {
45
45
let constraints = [ ]
46
46
47
47
// first check if page or constraints were given as url parameter
48
- if ( this . props . location . search !== '' ) {
48
+ if ( this . props . location && this . props . location . search !== '' ) {
49
49
const qs = this . props . location . search . replace ( '?' , '' )
50
50
const parsedConstraints = querystring . parse ( qs ) . constraints
51
51
// do not try to import constraints twice for ApexChartsDouble components
@@ -108,7 +108,7 @@ class ApexChart extends React.Component {
108
108
109
109
// check if facets are still fetching
110
110
let someFacetIsFetching = false
111
- if ( pageType === 'facetResults' ) Object . values ( this . props . facetState . facets ) . forEach ( facet => { if ( facet . isFetching ) { someFacetIsFetching = true } } )
111
+ if ( pageType === 'facetResults' && this . props . facetState ) Object . values ( this . props . facetState . facets ) . forEach ( facet => { if ( facet . isFetching ) { someFacetIsFetching = true } } )
112
112
113
113
// refetch default facets (excl. text facets) when facets have been updated
114
114
if ( this . state . defaultFacetFetchingRequired && this . props . facetUpdateID > 0 && ! someFacetIsFetching ) {
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class Deck extends React.Component {
76
76
let constraints = [ ]
77
77
78
78
// first check if page or constraints were given as url parameter
79
- if ( this . props . location . search !== '' ) {
79
+ if ( this . props . location && this . props . location . search !== '' ) {
80
80
const qs = this . props . location . search . replace ( '?' , '' )
81
81
const parsedConstraints = querystring . parse ( qs ) . constraints
82
82
constraints = parsedConstraints ? JSON . parse ( decodeURIComponent ( parsedConstraints ) ) : [ ]
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class LeafletMap extends React.Component {
78
78
let constraints = [ ]
79
79
80
80
// first check if page or constraints were given as url parameter
81
- if ( this . props . location . search !== '' ) {
81
+ if ( this . props . location && this . props . location . search !== '' ) {
82
82
const qs = this . props . location . search . replace ( '?' , '' )
83
83
const parsedConstraints = querystring . parse ( qs ) . constraints
84
84
constraints = parsedConstraints ? JSON . parse ( decodeURIComponent ( parsedConstraints ) ) : [ ]
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class ResultTable extends React.Component {
87
87
let constraints = [ ]
88
88
89
89
// first check if page or constraints were given as url parameter
90
- if ( this . props . location . search === '' ) {
90
+ if ( this . props . location && this . props . location . search === '' ) {
91
91
page = this . props . data . page === - 1 ? 0 : this . props . data . page
92
92
} else {
93
93
const qs = this . props . location . search . replace ( '?' , '' )
@@ -136,7 +136,7 @@ class ResultTable extends React.Component {
136
136
137
137
// check if facets are still fetching
138
138
let someFacetIsFetching = false
139
- Object . values ( this . props . facetState . facets ) . forEach ( facet => { if ( facet . isFetching ) { someFacetIsFetching = true } } )
139
+ if ( this . props . facetState ) Object . values ( this . props . facetState . facets ) . forEach ( facet => { if ( facet . isFetching ) { someFacetIsFetching = true } } )
140
140
// refetch default facets (excl. text facets) when facets have been updated
141
141
if ( this . state . defaultFacetFetchingRequired && this . props . facetUpdateID > 0 && ! someFacetIsFetching ) {
142
142
const defaultFacets = this . props . perspectiveConfig . defaultActiveFacets
You can’t perform that action at this time.
0 commit comments