Issue 456: IE 8 length is null error
Status:  Done
Owner: ----
Closed:  Apr 2010
Reported by allon.mo...@gmail.com, Apr 22, 2010
IE 8 gives me the following error when I browse my dev site
http://g4j.laoneo.net/dev_1_5/gcalendar-view.html:
Message: 'length' is null or not an object
Line: 393
Char: 22
Code: 0
URI:
http://g4j.laoneo.net/dev_1_5/components/com_gcalendar/libraries/fullcalendar/fullcalendar.min.js

I'm trying to find the problem now for hours and I'm really frustrated
because in all other browsers it is working perfect. Any help would be great!!!

I didn't want to change all the urls in my code so I put the content of the
file fullcalendar.js into the file fullcalendar.min.js.



Apr 23, 2010
#1 tanguy.pruvot@gmail.com
http://g4j.laoneo.net/content/support/forum/38-version-220/5297-275-gcalendar-220-
rc2-ie8-script-error.html#5314


diff --git a/src/main.js b/src/main.js
index 5c7d9e2..3e9611a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -408,7 +408,7 @@ $.fn.fullCalendar = function(options) {
                                pushLoading();
                                src(cloneDate(eventStart), cloneDate(eventEnd), 
reportEventsAndPop);
                        }
-                       else {
+                       else if (src) {
                                reportEvents(src); // src is an array
                        }
                }

Apr 23, 2010
#2 tanguy.pruvot@gmail.com
In IE8 length is 3, and in Google Chrome, length is 2 with exactly same things in the 
Array... IE8 is counting the Methods as item... so my fix is correct to prevent call on 
the [2] index which doesnt exists...


fullcalendar.fcdragabke.compiled.git.20100423.zip
35.1 KB   Download
Apr 23, 2010
#3 allon.mo...@gmail.com
Can be closed. Don't write something like eventSources: [ 'example.com',] in
fullcalendar, IE will die!!
Apr 27, 2010
Project Member #4 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Done