diff --git a/CHANGELOG b/CHANGELOG index 3dcdb36..5d5020a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Make Ajax.Response#_getResponseJSON use Ajax.Response#responseText. [Tobie Langel] + * Remove the forked declaration of Hash#_each. As we are now systematically cloning the object upon instantiation, preventing iteration of shadowed properties is no longer required. [Tobie Langel] * Performance optimizations for Event#findElement. Make Event#findElement's expression argument optional, in which case the extended target element is returned (same as Event#element). [Tobie Langel] diff --git a/src/ajax.js b/src/ajax.js index 7f5c701..1d6f21d 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -291,7 +291,7 @@ Ajax.Response = Class.create({ !(this.getHeader('Content-type') || '').include('application/json'))) return null; try { - return this.transport.responseText.evalJSON(options.sanitizeJSON); + return this.responseText.evalJSON(options.sanitizeJSON); } catch (e) { this.request.dispatchException(e); }