From f8ffe7b40f57031ae3bf22b8c35deec002c53d93 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Thu, 15 Nov 2007 14:02:25 +0000 Subject: [PATCH] prototype: Make Ajax.Response#_getResponseJSON use Ajax.Response#responseText. --- CHANGELOG | 2 ++ src/ajax.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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); }