Skip to content

Commit

Permalink
explicitly convert numbers to string if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
BePo65 committed Oct 10, 2021
1 parent 753142e commit 8fc0f08
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pig.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
' height: 100%;' +
' width: 100%;' +
' opacity: 0;' +
' transition: ' + (transitionSpeed / 1000) + 's ease opacity;' +
' -webkit-transition: ' + (transitionSpeed / 1000) + 's ease opacity;' +
' transition: ' + (transitionSpeed / 1000).toString(10) + 's ease opacity;' +
' -webkit-transition: ' + (transitionSpeed / 1000).toString(10) + 's ease opacity;' +
'}' +
'.' + classPrefix + '-figure img.' + classPrefix + '-thumbnail {' +
' -webkit-filter: blur(30px);' +
Expand Down Expand Up @@ -273,7 +273,7 @@
* @returns {string} The URL of the image at the given size.
*/
urlForSize: function(filename, size) {
return '/img/' + size + '/' + filename;
return '/img/' + size.toString(10) + '/' + filename;
},

/**
Expand Down Expand Up @@ -379,7 +379,7 @@
*/
Pig.prototype._getTransitionString = function() {
if (this.isTransitioning) {
return (this.settings.transitionSpeed / 1000) + 's transform ease';
return (this.settings.transitionSpeed / 1000).toString(10) + 's transform ease';
}

return 'none';
Expand Down Expand Up @@ -528,7 +528,6 @@
this.totalHeight = translateY - this.settings.spaceBetweenImages;
};


/**
* Update the DOM to reflect the style values of each image in the PIG,
* adding or removing images appropriately.
Expand Down Expand Up @@ -853,7 +852,6 @@
}

this.existsOnPage = false;

};

/**
Expand Down

0 comments on commit 8fc0f08

Please sign in to comment.