Skip to content
This repository was archived by the owner on Jul 11, 2024. It is now read-only.

adds promise callback to emebed plugin & adds url to the linkObject tooltip content - #52

Open
TomRibuot wants to merge 2 commits into
masterfrom
feature/plugin-improvement
Open

adds promise callback to emebed plugin & adds url to the linkObject tooltip content#52
TomRibuot wants to merge 2 commits into
masterfrom
feature/plugin-improvement

Conversation

@TomRibuot

@TomRibuot TomRibuot commented Mar 21, 2017

Copy link
Copy Markdown
Collaborator
  • Ajout du support d'un callback avec promise comme pour les être plugins afin de récuperer les informations de manière custom
  • Ajout de l'url dans la bulle au survol d'un LinkObject
  • Ajout d'une condition dans le cas d'un reject dans les promises en cas d'annulation

@oltodo
oltodo temporarily deployed to drinkjs-pr-52 March 21, 2017 14:13 Inactive
}).catch(reason => {
if(reason.type !== 'cancel') {
throw reason;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est normal de throw dans le cas d'un reject? Ca risque pas de casser l'application?

@TomRibuot TomRibuot Mar 24, 2017

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui et non, ça lève une erreur mais l'application continue de tourner. Il n'y avait pas de mécanisme de gestion d'erreur à l'origine.
Le catch ici écoute un reject de toute la chaine de Promises; si la reason est un cancel (par exemple à la fermeture d'une modal) je ne throw rien, mais si ça vient d'autre part je pense qu'il est pertinent de throw

Peut être que l'attribut devrait se nommer autrement que type d'ailleurs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants