You can't run ``cb(data)`` like this because it will execute the function immediatelty. You need:

    .then(function() {
      cb(data);
    });