From 7c7ce66ae44eb2194b9b2a4ca53c10ffbc94d75d Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Tue, 19 Apr 2016 12:15:04 -0500 Subject: [PATCH] Prettifying the code related to showing the feedback dialog --- conference.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conference.js b/conference.js index c20bb505d..2e399827a 100644 --- a/conference.js +++ b/conference.js @@ -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;