jeudi 5 novembre 2020

Yield not stopping the flow in ember concurrency task

if (isEmpty(contact) || isEmpty(get(contact, 'emails'))) {
  contact = yield store.findRecord('contact', contactId);
}

if (isEmpty(contact) || isEmpty(get(contact, 'emails'))) {
  flashMessages.danger(i18n.t('email.cpq_document_email_missing'));
  return false;
}

The second block runs when the promise is running and Im getting an error. Shouldn't it stop the flow until the promise is resolved.

The promise runs fine and it works the next time




Aucun commentaire:

Enregistrer un commentaire