-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.15-?] Edge Promise.finally not defined #3427
Comments
supportIE only polyfills what quasar uses. Just replace |
This is weird as the IE polyfill contains the prototype for adding the
From what I've read and test, this version will not work for a special case that I have. I need to throw an error in the catch, so the next An ex : Promise.resolve()
.then( () => ) {
// Show a loading message...
throw new Error('foo');
})
.catch((ex) => {
// Log the error...
// Rethrow it
throw ex;
})
.finally(() => {
// Hide the loading message...
}) Do you know another way to get it working as a finally ? |
In your case just hide loading message in catch before throw. |
Yes, your're right @pdanpdan, this is a solution I had considered, but I would have liked to avoid duplicate code. Now I've no choice. Is there a chance the polyfill ie-compat be fixed to test for the support of I would be more than please to make the PR but I'm not sure to really understand how this polyfill work and how it detect the missing support. |
Usual workaround for I would suggest you to not bet on polyfills when the workaround is that simple. Polyfilling and transpilation is very complex. Adding such a simple thing is not really worth it considering the risk of possible breakage. Another thing is that 0.15 is really old version and full focus is on 1.0 now. We can't spend time patching legacy version. |
Thank you, but did you read this reply ? I' can't use
As for the version 1.0 of quasar, I already explained that I can't update for now. |
@purell I've read your reply, but I think I mean something different. This behaves exactly the same as your Promise.resolve()
.then( () => ) {
// Show a loading message...
throw new Error('foo');
})
.catch((ex) => {
// Log the error...
// Rethrow it
throw ex;
})
.then(() => {
// Hide the loading message...
}, () => {
// Hide the loading message...
}) (better to extract the function of course) The only difference for |
So to be clear, both versions are working but both duplicate the code anyway :( I would have liked to see
Promise.resolve()
.then(() => {
// Show a loading message...
throw new Error('foo');
})
.catch((ex) => {
// Log the error...
// Rethrow it
throw ex;
})
.then(() => {
// Hide the loading message...
console.log('Hide message 1');
}, () => {
// Hide the loading message...
console.log('Hide message 2');
});
Promise.resolve()
.then(() => {
// Show a loading message...
throw new Error('foo');
})
.catch((ex) => {
// Log the error...
// Hide the loading message...
console.log('Hide message');
// Rethrow it
throw ex;
})
.then(() => {
// Hide the loading message...
console.log('Hide message');
}); |
@purell - if you can you confirm that this is still happening in quasar 0.17, then I imagine we would dig into it after 1.0 launches. We have no plans to continue to support 0.15 On a side note, .finally is called REGARDLESS of a catch, that's why its called finally.
|
Software version
Quasar: 0.15.5
@quasar/app (v1+ only):
OS: Windows 10
Node: v8.9.3
NPM: 5.5.1
Browsers: Microsoftt Edge 17
iOS: N/A
Android: N/A
Any other software related to your bug:
JsFiddle
https://jsfiddle.net/1oqygeh9/2/
What did you get as the error?
object doesn't support property or method finally
What were you expecting?
I was expecting to see the message
Finally fired
likeThe polyfill do not seems to work properly.
Could it be because the polyfill only fill when Promise is not supported at al instead of also test for only missing
finally
method ? If yes, this could be the source of the problem, because Edge < 18 support Promise but not the methodfinally
.What steps did you take, to get the error?
I load the jsfiddle page with Microsoft Edge 17 and I simply get the error.
I have two workmates with Windows 10 who their Windows 10 is not in developer mode and they seem to be stuck at Edge version 17, Windows update says it is up to date!
For Edge version 18, this is working properly but as I know the
Promise.finally
is now natively supported. Ref ChakraCore #3520Ref: https://en.wikipedia.org/wiki/Microsoft_Edge
I'm still using an old version of quasar, but for now we are stuck and can't update to new version. Maybe in a couple of week we will.
Also, I already set the IE support flag in
quasar.conf.js
.The text was updated successfully, but these errors were encountered: