Hi,
I've been fighting this issue all day, trying to make sense of it and why would the first check the function does fails:
if (value instanceof Date) {
return value;
}
It turns out that when you're passing around information across frames (iframe), the instanceof does not recognize it as a date anymore (but it is). So the function goes on to assume it's a string and tries to call value.indexOf(...) and that of course fails because it's not a string.
After some investigation I ran across a solution to this, and that would be to change this initial check from what it was to:
if (Object.prototype.toString.call(value) === '[object Date]') {
return value;
}
I tested it in my environment and it works. I'm attaching a test case so you can verify. Hope you can fix this soon, be it with my suggestion or by any other means.
Thanks a lot!
Andrés
I've been fighting this issue all day, trying to make sense of it and why would the first check the function does fails:
if (value instanceof Date) {
return value;
}
It turns out that when you're passing around information across frames (iframe), the instanceof does not recognize it as a date anymore (but it is). So the function goes on to assume it's a string and tries to call value.indexOf(...) and that of course fails because it's not a string.
After some investigation I ran across a solution to this, and that would be to change this initial check from what it was to:
if (Object.prototype.toString.call(value) === '[object Date]') {
return value;
}
I tested it in my environment and it works. I'm attaching a test case so you can verify. Hope you can fix this soon, be it with my suggestion or by any other means.
Thanks a lot!
Andrés