When you use the &&
operator with two JavaScript objects, the result is the value of the first object, so only the one that $.when
. The second object is not even evaluated.
Instead, you want to pass both objects as different arguments to the $.when
function:
$.when(app.loadDevice, app.loadReady).then(function(){
This can be seen in some examples in the official documentation .
source share