brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Avoid use of then() on promises #1934

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by njx Tuesday Oct 30, 2012 at 23:33 GMT Originally opened as https://github.com/adobe/brackets/issues/1997


Most of Brackets is using done()/fail() to attach handlers to promises, but there are a few places where we use then(). The semantics of then() are actually a bit weird--in jQuery 1.7 (which we're currently using) they don't match the Promises/A spec when chained; in jQuery 1.8, they chain like Promises/A, but don't handle exceptions the same way.

We don't currently seem to be using chaining with then(), but given the change in semantics between the two versions of jQuery, it seems safer to just avoid then() altogether, and use done()/fail() instead. If we want sequential chaining semantics, we should be able to use pipe().

core-ai-bot commented 3 years ago

Comment by pthiess Tuesday Nov 06, 2012 at 00:16 GMT


Reviewed

core-ai-bot commented 3 years ago

Comment by njx Sunday Jan 13, 2013 at 19:32 GMT


See discussion in #1034 for some background on differences between jQuery and Promises/A.

core-ai-bot commented 3 years ago

Comment by WebsiteDeveloper Wednesday Jan 30, 2013 at 17:28 GMT


@njx i think this issue can be closed

core-ai-bot commented 3 years ago

Comment by njx Wednesday Jan 30, 2013 at 17:48 GMT


Awesome, thanks for fixing this!