Skip to content

Commit

Permalink
* Fix scrollIntoView without metric.
Browse files Browse the repository at this point in the history
  • Loading branch information
qixinzhi committed Apr 12, 2024
1 parent 8d862f6 commit 1306105
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module/metric/js/preview.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ window.afterPageUpdate = function($target, info, options)
}
window.filterChecked = {};

if(viewType == 'single') $('.metric-tree .metric-current')[0].scrollIntoView({block: 'center', inline: 'start' })
if(viewType == 'single')
{
var metricCurrent = $('.metric-tree .metric-current');
if(metricCurrent.length) metricCurrent[0].scrollIntoView({block: 'center', inline: 'start' })
}
if(viewType == 'multiple')
{
window.renderCheckedLabel();
Expand Down

0 comments on commit 1306105

Please sign in to comment.