Skip to content

Commit dfa4c5b

Browse files
committed
Merge pull request buildinternet#85 from matt-richardson/master
Bug fix for data.photoset.owner null
2 parents b81e0e4 + 54d3394 commit dfa4c5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flickr/js/supersized.flickr.1.1.2.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
//create image urls
168168
var photoURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_' + options.image_size + '.jpg';
169169
var thumbURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_t.jpg';
170-
var photoLink = "http://www.flickr.com/photos/" + data.photoset.owner + "/" + item.id + "/";
170+
var photoLink = "http://www.flickr.com/photos/" + (data.photoset ? data.photoset.owner : item.owner) + "/" + item.id + "/";
171171

172172
if (i == 0){
173173
options.slides.splice(0,1,{ image : photoURL, thumb : thumbURL, title : item.title , url : photoLink });
@@ -560,7 +560,7 @@
560560
if ((browserheight/browserwidth) > ratio){
561561
options.fit_landscape && ratio <= 1 ? resizeWidth() : resizeHeight(); //If landscapes are set to fit
562562
} else {
563-
options.fit_portrait && ratio > 1 ? resizeHeight() : resizeWidth(); //If portraits are set to fit
563+
options.fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(); //If portraits are set to fit
564564
}
565565

566566
}

0 commit comments

Comments
 (0)