Authored by htoooth

add js

@@ -1365,10 +1365,15 @@ function loadConsult() { @@ -1365,10 +1365,15 @@ function loadConsult() {
1365 $('.consults-pager').on('click', 'a', function() { 1365 $('.consults-pager').on('click', 'a', function() {
1366 var $this = $(this); 1366 var $this = $(this);
1367 var href = $this.data('page'); 1367 var href = $this.data('page');
1368 - var data = href.split('?')[1].split('&')[1].split('=')[1]; 1368 +
  1369 + if (!href) {
  1370 + return;
  1371 + }
  1372 +
  1373 + var data = href.split('?')[1].split('&')[1].split('=')[1]; // eslint-disable-line
1369 1374
1370 loadConsults(data).always(function() { 1375 loadConsults(data).always(function() {
1371 - _scrollTo($('#goodsAskTitle')); 1376 + _scrollTo($('#goodsAskTitle')); // eslint-disable-line
1372 }); 1377 });
1373 }); 1378 });
1374 1379