Object.isHash throws an error in IE6, if event.recordset is passed
Reported by Viktor Kojouharov | May 7th, 2008 @ 01:45 PM | in 1.6.0.3
Object.isHash does not break when a normal null object is passed. But if event.recordset is passed (the debugger says that event.recordset === null), it fails.
Comments and changes to this ticket
-
Tobie Langel May 7th, 2008 @ 01:59 PM
- → State changed from new to bug
-
John-David Dalton May 10th, 2008 @ 05:10 AM
This is an odd one:
Object.isHash(null); //works fine Object.isHash(evt.foo); //works fine alert(typeof evt.recordset); //object alert(evt.recordset === null); //true Object.isHash(evt.recordset); //boom!!! //changing the code in the base.js to: isHash: function(object) { return object && object instanceof Hash; } //fixes the issue.Maybe it's another wierd IE host object bug
-
Juriy Zaytsev May 9th, 2008 @ 02:04 AM
wow, this reminds me of another IE issue when checking for offsetParent throws IE off the ground - even when it's done using "in" operator. bravo.
-
Juriy Zaytsev May 9th, 2008 @ 02:04 AM
- → Milestone changed from to 1.6.0.3
-
Juriy Zaytsev May 10th, 2008 @ 01:42 AM
Indeed,
undefined_var instanceof Hash; // throws error in IE => 'undefined_var' is undefined -
Juriy Zaytsev May 10th, 2008 @ 01:49 AM
- → Assigned user changed from to Juriy Zaytsev
Fixed in http://github.com/kangax/prototy...
-
-
John-David Dalton May 10th, 2008 @ 05:11 AM
I didn't test with an undefined variable, rather the host object that === null.
I just noticed I had "event" in my post and it was supposed to be "evt".
-
Juriy Zaytsev May 31st, 2008 @ 04:21 PM
- → Assigned user changed from Juriy Zaytsev to John-David Dalton
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
