Prettifying the code related to showing the feedback dialog

This commit is contained in:
hristoterezov 2016-04-19 12:15:04 -05:00
parent 73b4ad5a63
commit 7c7ce66ae4
1 changed files with 3 additions and 4 deletions

View File

@ -125,12 +125,11 @@ function muteLocalVideo (muted) {
function hangup (requestFeedback = false) {
APP.conference._room.leave().then(() => {
connection.disconnect();
let promise = Promise.resolve();
if (requestFeedback) {
promise = APP.UI.requestFeedback();
return APP.UI.requestFeedback();
} else {
return Promise.resolve();
}
return promise;
}).then(function () {
if (!config.enableWelcomePage) {
return;