-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Replace .isResolved & .isRejected with .state #3665
Replace .isResolved & .isRejected with .state #3665
Conversation
Also, should the wiki/Brackets-Coding-Conventions be updated to advise people to use |
@@ -20365,7 +20365,7 @@ define('LiveDevelopment/Inspector/Inspector',['require','exports','module'],func | |||
_connectDeferred = deferred; | |||
var promise = getAvailableSockets(); | |||
promise.done(function onGetAvailableSockets(response) { | |||
if (deferred.isRejected()) { | |||
if (deferred.state() === "rejected") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert changes in brackets-concat. We're trying to keep this file as-is for benchmarking over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonsanjose Do you think we should rename that file so it's more clear it shouldn't be modified? This gotcha seems to come up fairly regularly...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brackets-concat-do-not-edit? :) You'd think being under the top level /test folder would be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, just not always sure what needs to get changed to not break functionality (even in test environment).
Reviewing |
@TuckerWhitehouse I don't think we necessarily need a note on the wiki to avoid deprecated or soon-to-be-deprecated APIs. Your changes look good and passes tests. Merging. |
…thods Replace .isResolved & .isRejected with .state
This is a step towards the eventually upgrade to jQuery 2.0 (#3123).
Both
.isResolved
&.isRejected
were deprecated in jQuery 1.7 and removed in 1.8 (http://api.jquery.com/deferred.isResolved/).