vuejs-dialog icon indicating copy to clipboard operation
vuejs-dialog copied to clipboard

The promise reject doesn't really make sense...

Open nicroto opened this issue 7 years ago • 3 comments

Especially when you use the dialog from an async function - you will have to make the call inside of a try-catch block or you get a false error within the console when you cancel the confirm operation (because of the unhandled reject call).

nicroto avatar Jul 29 '18 15:07 nicroto

That's correct... Do you have any idea how this can be improved? I'm thinking of resolving the promise with a property that takes the value false on rejection instead of rejecting the promise... Do let me know if you have a better idea.

Thanks

Godofbrowser avatar Jul 31 '18 07:07 Godofbrowser

I think it's the correct way as it correspond to what the user did: say "false" to the question prompted.

superbiche avatar Nov 28 '18 20:11 superbiche

What is the reason the promise rejects with false? It seems to me that you'd reject a promise with either nothing or an error object. If it's not necessary, I'd suggest to remove the false from the rejection so we don't get a warning about an unhandled promise rejection.

paddotk avatar Oct 14 '21 10:10 paddotk