diff --git a/JitsiConference.js b/JitsiConference.js index 4196633113..6aad54e210 100644 --- a/JitsiConference.js +++ b/JitsiConference.js @@ -2478,9 +2478,7 @@ JitsiConference.prototype.dial = function(number) { return this.room.dial(number); } - return new Promise((resolve, reject) => { - reject(new Error('The conference is not created yet!')); - }); + return Promise.reject(new Error('The conference is not created yet!')); }; /** @@ -2491,9 +2489,7 @@ JitsiConference.prototype.hangup = function() { return this.room.hangup(); } - return new Promise((resolve, reject) => { - reject(new Error('The conference is not created yet!')); - }); + return Promise.resolve(); }; /**