Skip to content

Commit 1fc7720

Browse files
use const instead of var
1 parent e437454 commit 1fc7720

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/render-facade.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ var vizClipboard1=null;
131131
$(window).on('scroll', function() {
132132
$('div.visualizer-front:not(.viz-facade-loaded):not(.visualizer-lazy):not(.visualizer-cw-error):empty').each(function(index, element){
133133
// Do not render charts that are intentionally hidden.
134-
var style = window.getComputedStyle(element);
134+
const style = window.getComputedStyle(element);
135135
if (style.display === 'none' || style.visibility === 'hidden') {
136136
return;
137137
}
138138

139-
var id = $(element).addClass('viz-facade-loaded').attr('id');
139+
const id = $(element).addClass('viz-facade-loaded').attr('id');
140140
setTimeout(function(){
141141
// Add a short delay between each chart to avoid overloading the browser event loop.
142142
showChart(id);
@@ -146,12 +146,12 @@ var vizClipboard1=null;
146146

147147
$('div.visualizer-front-container:not(.visualizer-lazy-render)').each(function(index, element){
148148
// Do not render charts that are intentionally hidden.
149-
var style = window.getComputedStyle($(element).find('.visualizer-front')[0]);
149+
const style = window.getComputedStyle($(element).find('.visualizer-front')[0]);
150150
if (style.display === 'none' || style.visibility === 'hidden') {
151151
return;
152152
}
153153

154-
var id = $(element).find('.visualizer-front').addClass('viz-facade-loaded').attr('id');
154+
const id = $(element).find('.visualizer-front').addClass('viz-facade-loaded').attr('id');
155155
setTimeout(function(){
156156
// Add a short delay between each chart to avoid overloading the browser event loop.
157157
showChart(id);

0 commit comments

Comments
 (0)