File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/components/contractors Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,14 @@ class Contractors extends Component {
117117 }
118118
119119 render ( ) {
120- let description = ''
121120 const con_count = this . state . contractor_response && this . state . contractor_response . count
122121 const location_pretty = (
123122 this . state . contractor_response &&
124123 this . state . contractor_response . location &&
125124 this . state . contractor_response . location . pretty
126125 )
127126
127+ let description = ''
128128 if ( con_count ) {
129129 const description_prefix = [ ]
130130 if ( location_pretty ) {
@@ -133,10 +133,12 @@ class Contractors extends Component {
133133 if ( this . state . selected_subject ) {
134134 description_prefix . push ( this . state . selected_subject . name )
135135 }
136- description = this . props . root . get_text ( 'filter_summary_' + ( con_count === 1 ? 'single' : 'plural' ) , {
137- count : con_count ,
138- prefix : description_prefix . join ( '; ' ) ,
139- } )
136+ if ( description_prefix . length > 0 ) {
137+ description = this . props . root . get_text ( 'filter_summary_' + ( con_count === 1 ? 'single' : 'plural' ) , {
138+ count : con_count ,
139+ prefix : description_prefix . join ( '; ' ) ,
140+ } )
141+ }
140142 }
141143 const DisplayComponent = this . props . config . mode === 'grid' ? Grid : List
142144 return (
You can’t perform that action at this time.
0 commit comments