prototype: Make Ajax.Response#_getResponseJSON use Ajax.Response#responseText.

This commit is contained in:
Tobie Langel 2007-11-15 14:02:25 +00:00
parent 26b4b3aee5
commit f8ffe7b40f
2 changed files with 3 additions and 1 deletions

View File

@ -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]

View File

@ -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);
}