Skip to content

Commit

Permalink
fix: add missing variable declarations (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherwinski authored Mar 10, 2020
1 parent 5e6f74b commit 851a607
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/imgix-core-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@
function validateAndDestructureOptions(options) {
if (options.widthTolerance !== undefined) {
validateWidthTolerance(options.widthTolerance);
widthTolerance = options.widthTolerance;
var widthTolerance = options.widthTolerance;
} else {
widthTolerance = DEFAULT_SRCSET_WIDTH_TOLERANCE;
var widthTolerance = DEFAULT_SRCSET_WIDTH_TOLERANCE;
}

minWidth = options.minWidth === undefined ? MIN_SRCSET_WIDTH : options.minWidth;
maxWidth = options.maxWidth === undefined ? MAX_SRCSET_WIDTH : options.maxWidth;
var minWidth = options.minWidth === undefined ? MIN_SRCSET_WIDTH : options.minWidth;
var maxWidth = options.maxWidth === undefined ? MAX_SRCSET_WIDTH : options.maxWidth;

// Validate the range unless we're using defaults for both
if (minWidth != MIN_SRCSET_WIDTH || maxWidth != MAX_SRCSET_WIDTH) {
Expand All @@ -275,7 +275,7 @@
if (!Array.isArray(customWidths) || !customWidths.length) {
throw new Error('The widths argument can only be passed a valid non-empty array of integers');
} else {
allPositiveIntegers = customWidths.every(
var allPositiveIntegers = customWidths.every(
function(width) {
return Number.isInteger(width) && width > 0
}
Expand Down

0 comments on commit 851a607

Please sign in to comment.