mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(invite): IFrame api when invalid invitees are passed.
This commit is contained in:
committed by
Дамян Минков
parent
fb75180632
commit
bd8559fad6
8
modules/API/external/external_api.js
vendored
8
modules/API/external/external_api.js
vendored
@@ -238,7 +238,9 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
}
|
||||
})
|
||||
});
|
||||
this.invite(invitees);
|
||||
if (Array.isArray(invitees) && invitees.length > 0) {
|
||||
this.invite(invitees);
|
||||
}
|
||||
this._isLargeVideoVisible = true;
|
||||
this._numberOfParticipants = 0;
|
||||
this._participants = {};
|
||||
@@ -597,6 +599,10 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
* @returns {Promise} - Resolves on success and rejects on failure.
|
||||
*/
|
||||
invite(invitees) {
|
||||
if (!Array.isArray(invitees) || invitees.length === 0) {
|
||||
return Promise.reject(new TypeError('Invalid Argument'));
|
||||
}
|
||||
|
||||
return this._transport.sendRequest({
|
||||
name: 'invite',
|
||||
invitees
|
||||
|
||||
Reference in New Issue
Block a user