fix(invite): IFrame api when invalid invitees are passed.
This commit is contained in:
committed by
Дамян Минков
parent
fb75180632
commit
bd8559fad6
@@ -112,11 +112,21 @@ function initCommands() {
|
||||
const { name } = request;
|
||||
|
||||
switch (name) {
|
||||
case 'invite':
|
||||
case 'invite': // eslint-disable-line no-case-declarations
|
||||
const { invitees } = request;
|
||||
|
||||
if (!Array.isArray(invitees) || invitees.length === 0) {
|
||||
callback({
|
||||
error: new Error('Unexpected format of invitees')
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// The store should be already available because API.init is called
|
||||
// on appWillMount action.
|
||||
APP.store.dispatch(
|
||||
invite(request.invitees, true))
|
||||
invite(invitees, true))
|
||||
.then(failedInvitees => {
|
||||
let error;
|
||||
let result;
|
||||
|
||||
Reference in New Issue
Block a user