Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Replace .isResolved & .isRejected with .state #3665

Merged
merged 3 commits into from Apr 30, 2013
Merged

Replace .isResolved & .isRejected with .state #3665

merged 3 commits into from Apr 30, 2013

Conversation

TuckerWhitehouse
Copy link
Contributor

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/).

@TuckerWhitehouse
Copy link
Contributor Author

Also, should the wiki/Brackets-Coding-Conventions be updated to advise people to use .state instead of .isResolved or .isRejected?

@ghost ghost assigned jasonsanjose Apr 30, 2013
@@ -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") {
Copy link
Member

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.

Copy link
Member

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...

Copy link
Member

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.

Copy link
Contributor Author

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).

@jasonsanjose
Copy link
Member

Reviewing

@jasonsanjose
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants