File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -131,20 +131,23 @@ jQuery(document).ready(function(){
131
131
132
132
}
133
133
}
134
- if ( ct_connection_reports_negative > 0 && ct_connection_reports_negative_report )
134
+ if ( ct_connection_reports_negative > 0 && ct_connection_reports_negative_report )
135
135
{
136
136
var html = '<center><table id = "connection_reports_table" class="table table-bordered table-hover table-striped" cellspacing=0 cellpadding=3><thead><tr><th>' + ct_connection_reports_table_date + '</th><th>' + ct_connection_reports_table_pageurl + '</th><th>' + ct_connection_reports_table_libreport + '</th></tr></thead><tbody>' ;
137
137
var negative_report = JSON . parse ( ct_connection_reports_negative_report ) ;
138
- negative_report . forEach ( function ( item , i , arr ) {
139
- html += '<tr>' ;
140
- html += '<td>' + negative_report [ i ] . date + '</td>' ;
141
- html += '<td>' + negative_report [ i ] . page_url + '</td>' ;
142
- html += '<td>' + negative_report [ i ] . lib_report + '</td>' ;
143
- html += '</tr>' ;
144
- } ) ;
145
- html += '</tbody></table></center>' ;
146
- html += "<button id='send_connection_report' class='btn btn-success' type='button'>" + ct_connection_reports_send_report + "</button>" ;
147
- jQuery ( '#connection_reports' ) . append ( html ) ;
138
+ if ( negative_report ) {
139
+ negative_report . forEach ( function ( item , i , arr ) {
140
+ html += '<tr>' ;
141
+ html += '<td>' + negative_report [ i ] . date + '</td>' ;
142
+ html += '<td>' + negative_report [ i ] . page_url + '</td>' ;
143
+ html += '<td>' + negative_report [ i ] . lib_report + '</td>' ;
144
+ html += '</tr>' ;
145
+ } ) ;
146
+ html += '</tbody></table></center>' ;
147
+ html += "<button id='send_connection_report' class='btn btn-success' type='button'>" + ct_connection_reports_send_report + "</button>" ;
148
+ jQuery ( '#connection_reports' ) . append ( html ) ;
149
+ }
150
+
148
151
}
149
152
else
150
153
jQuery ( "#connection_reports" ) . append ( "<center><h2>" + ct_connection_reports_no_reports + "</h2></center>" )
You can’t perform that action at this time.
0 commit comments