diff --git a/CHANGELOG b/CHANGELOG index 1df0ff5..4d9e3df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Ensure Ajax.Response#getHeader returns null for missing headers in Opera. [Tobie Langel] + * Allow WEBrick to simulate slow or dropped connections and to ease Ajax request inspection. [Tobie Langel] * Ensure Ajax.Response#getHeader returns null for missing headers. [Tobie Langel] diff --git a/src/ajax.js b/src/ajax.js index 90c4a83..e576a1e 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -209,8 +209,7 @@ Ajax.Request = Class.create(Ajax.Base, { getHeader: function(name) { try { - var header = this.transport.getResponseHeader(name); - return Object.isUndefined(header) ? null : header; + return this.transport.getResponseHeader(name) || null; } catch (e) { return null } },