dojo.io.cookie.setObjectCookie
Remove if(prop == null) {delete cookie[prop];}
it is not needed and will never will be true.
a primitive string will never equal the null object.
for(var prop in obj) {
if (typeof obj[prop] == "string" || typeof obj[prop] == "number")
{cookie[prop] = obj[prop];
}
Replaces:
for(var prop in obj) {
if (prop == null) {
delete cookie[prop];
} else if (typeof obj[prop] == "string" || typeof obj[prop] == "number") {
cookie[prop] = obj[prop];
}
}
Change History (3)
Resolution: |
→ invalid
|
Status: |
new →
closed
|
Like the previous bug report, there are rare situations where the condition might actually be met.