Skip to content
Permalink
Browse files
Quote reserved keyword 'throws' to satisfy yui compressor. Fixes #12158.
  • Loading branch information
timmywil committed Jul 30, 2012
1 parent e07b444 commit beeab4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -861,7 +861,7 @@ function ajaxConvert( s, response ) {
if ( conv !== true ) {

// Unless errors are allowed to bubble, catch and return them
if ( conv && s.throws ) {
if ( conv && s["throws"] ) {

This comment has been minimized.

Copy link
@mikesherov

mikesherov Jul 30, 2012

Member

@timmywil, can you leave a comment here please, so that @gibson042 and I don't change it back during one of our compression sweeps?

This comment has been minimized.

Copy link
@mathiasbynens

mathiasbynens Jul 30, 2012

Contributor

How about this comment:

For backwards compatibility with ES3, you can’t use dot notation here; you’ll have to use bracket notation.

(Taken from http://mothereff.in/js-properties#throws.)

This comment has been minimized.

Copy link
@timmywil

timmywil Jul 30, 2012

Author Member

We may rename this property since it is new.

response = conv( response );
} else {
try {
@@ -362,7 +362,7 @@ jQuery.fn.extend({
dataType: "script",
async: false,
global: false,
throws: true
"throws": true

This comment has been minimized.

Copy link
@mathiasbynens

mathiasbynens Jul 30, 2012

Contributor

The comment here could be:

You need to quote this property name for backwards compatibility with ES3.

(Taken from http://mothereff.in/js-properties#throws.)

});
} else {
jQuery.error("no ajax");

0 comments on commit beeab4d

Please sign in to comment.