File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
frontend/src/components/app/users Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,14 @@ export default {
254254 const sliderRangesRequest = await this .$http .get (' /search/values' );
255255 const maxScore = sliderRangesRequest .data .search_minmax .max_score ;
256256 const sliderScore = document .getElementById (' sliderScore' );
257- const sliderScoreWidth = ` ${ sliderScore .getBoundingClientRect ().width } px` ;
258- const marginLeft = ` ${ (this .user .heat_score / maxScore) * 100 } %` ;
259- if (this .user .heat_score / maxScore < 0.2 ) {
260- sliderScore .style .marginLeft = ` ${ marginLeft} ` ;
261- } else {
262- sliderScore .style .marginLeft = ` calc(${ marginLeft} - ${ sliderScoreWidth} )` ;
257+ if (sliderScore) {
258+ const sliderScoreWidth = ` ${ sliderScore .getBoundingClientRect ().width } px` ;
259+ const marginLeft = ` ${ (this .user .heat_score / maxScore) * 100 } %` ;
260+ if (this .user .heat_score / maxScore < 0.2 ) {
261+ sliderScore .style .marginLeft = ` ${ marginLeft} ` ;
262+ } else {
263+ sliderScore .style .marginLeft = ` calc(${ marginLeft} - ${ sliderScoreWidth} )` ;
264+ }
263265 }
264266 },
265267};
You can’t perform that action at this time.
0 commit comments