From dd4aea54312b288dbfe885be87148f8df116047a Mon Sep 17 00:00:00 2001 From: czaks Date: Wed, 17 Jul 2013 22:15:16 -0400 Subject: [PATCH] inline-expanding.js: internal fix for better stability --- js/inline-expanding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/inline-expanding.js b/js/inline-expanding.js index ef84e806..7c9923fa 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -16,7 +16,7 @@ onready(function(){ var link = this.getElementsByTagName('a'); for(var i = 0; i < link.length; i++) { - if(typeof link[i] == "object" && link[i].childNodes[0].src && link[i].className != 'file') { + if(typeof link[i] == "object" && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].className != 'file') { link[i].childNodes[0].style.maxWidth = '95%'; link[i].onclick = function(e) { if(e.which == 2) {