JSFiddle - React, Tailwind, and code Playground
by Ryan Neufeld
JavaScript
var d1 = $.Deferred();
var d2 = $.Deferred();
var p1 = d1.promise();
var p2 = d2.promise();
function doThisAlways(){
console.log(arguments);
}
$.when(p1, p2.pipe(null, function(res) { return $.Deferred().resolve(res) }), "truthy thing")
.always(doThisAlways);
d2.reject("rejected!"); //Only seeing this
d1.resolve("resolved!"); //expecting this as well
console.log("Expecting", ['resolved!','rejected!','truthy thing']);