Execution Order Of Promises
I have the chain of promises below. By looking at the logger statements, I would expect the console to show: '2. Getting room', '3. Getting spontaneous session', '3A. Getting sp
Solution 1:
You are not returning the promise returned by:
connectTokboxZip()
This makes the containing then()
return undefined instead of a promise. It should look like:
then(function() {
if (req.body.translated === 'true') {
return connectTokboxZip(resolvedUrls.englishSessionUrl, sessionIds[1], room).then(function() {
logger.log('4. Attaching to meeting', 2, room);
return attachToMeeting(user, room);
});
}
else {
logger.log('4. Attaching to meeting', 2, room);
return attachToMeeting(user, room);
}
}).
Post a Comment for "Execution Order Of Promises"