Skip to content

Commit

Permalink
Bugfix: indexing typo, works by coincidence on most browsers. Affects…
Browse files Browse the repository at this point in the history
… 0.2.4 and higher.
  • Loading branch information
lilith committed Jan 9, 2015
1 parent a456cf7 commit 8f6cddd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Merge #27 from dancek - Configurable max-width and quality parameters
Merge #36 from dancek - Fix behavior when max-width is not defined (IE8) (replaces #18, fixes #29)
Refactored access notations to eliminate both minification errors and lint. Fix bug: Perfect multiples of stepWidth were being rounded up to the next interval (images larger than needed in some instances).
* 0.2.5 - Merge #30 from Jeavon - Fix css size calculation when the parent div is floated in Safari (both OS X and iOS). (otherwise 0x0)
* 0.2.6 - Fix typo causing ‘undefined’ is null error; affects 0.2.4+.


### Contributor notes
Expand Down
2 changes: 1 addition & 1 deletion slimmage.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
var totalImages = 0;
var images = s.nodesToArray(w.document.getElementsByTagName("img"));
for (var k = 0, kl = images.length; k < kl; k++) {
if (images[i].getAttribute("data-slimmage") !== null) {
if (images[k].getAttribute("data-slimmage") !== null) {
var originalSrc = images[k].getAttribute("data-src") || images[k].src;
s['adjustImageSrc'](images[k], originalSrc);
totalImages++;
Expand Down

2 comments on commit 8f6cddd

@Jeavon
Copy link
Contributor

@Jeavon Jeavon commented on 8f6cddd Jan 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix needs to be applied to the v0.3 branch also

@lilith
Copy link
Member Author

@lilith lilith commented on 8f6cddd Jan 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, hoping to introduce the v0.4 branch today, and leave v0.3 with a very short life.

Please sign in to comment.