It would be possible to "stop" the next "done" in the following code using only the deferred object? Thanks.
- var defer = new $.Deferred();
- var prom = defer.promise();
- defer.resolve();
- prom.done(function () {
- // I want to stop the second done
- defer.reject();
- });
- prom.done(function () {
- console.log('I do not wont this to be executed');
- });