Skip to content

Commit

Permalink
Use strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Glier committed Feb 15, 2022
1 parent d1a5e75 commit 4eb3fa0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/om-javascript-range-slider.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const OmRangeSliderInputValueStyles = {
DEFAULT_COMMA_SEPARATED: 0,
PHP_ARRAY: 1,
Expand Down Expand Up @@ -77,9 +79,7 @@ function OmRangeSlider(inputElement, inputValueStyle) {

const visualSliderContainer = document.createElement('div');
visualSliderContainer.className = input.className;
for (const stylePropertyName in input.style) {
visualSliderContainer.style[stylePropertyName] = input.style[stylePropertyName];
}

if (!visualSliderContainer.style.height) {
visualSliderContainer.style.height = input.offsetHeight + 'px';
}
Expand Down Expand Up @@ -200,7 +200,7 @@ function OmRangeSlider(inputElement, inputValueStyle) {

function triggerRangeChangeEvent(range) {
const event = new CustomEvent('rangechange', {detail: rangeValue});
input.value = this.range ? this.range.join(',') : '';
input.value = range ? range.join(',') : '';
input.dispatchEvent(event);
}

Expand Down

0 comments on commit 4eb3fa0

Please sign in to comment.