How to properly break out of a promise chain?
问题 Based on the question here: jQuery chaining and cascading then's and when's and the accepted answer, I want to break the promise chain at a point but haven\'t yet found the correct way. There are multiple posts about this, but I am still lost. Taking the example code from the original question: Menus.getCantinas().then(function(cantinas){ // `then` is how we chain promises Menus.cantinas = cantinas; // if we need to aggregate more than one promise, we `$.when` return $.when(Menus.getMeals