prototype: Ensure Ajax.Response#getHeader returns null for missing headers.
This commit is contained in:
parent
5a37860ffb
commit
f0d54a48bd
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Ensure Ajax.Response#getHeader returns null for missing headers. [Tobie Langel]
|
||||
|
||||
* Ensure $A creates an empty array when its argument's length is undefined. Closes #10574. [henryju, Tobie Langel]
|
||||
|
||||
* Fix incorrect variable declaration in Event.fire. Closes #10329. [rubley]
|
||||
|
|
|
@ -209,7 +209,8 @@ Ajax.Request = Class.create(Ajax.Base, {
|
|||
|
||||
getHeader: function(name) {
|
||||
try {
|
||||
return this.transport.getResponseHeader(name);
|
||||
var header = this.transport.getResponseHeader(name);
|
||||
return Object.isUndefined(header) ? null : header;
|
||||
} catch (e) { return null }
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue