Closed darxis closed 2 years ago
I am using es6-shim on some old Android device and I am experiencing errors when trying to call Promise.finally:
es6-shim
Object # has no method 'finally'
The following code outputs catch,then,constructor on my old Android device and outputs catch,then,finally,constructor on a modern PC browser.
catch,then,constructor
catch,then,finally,constructor
let promise = ...; alert(Object.getOwnPropertyNames(Object.getPrototypeOf(promise)).join(','));
It seems that Promise.finally has not been implemented yet?
Promise.finally
It's not missing - the method isn't in ES6, it was added in ES2018.
Use https://www.npmjs.com/package/promise.prototype.finally to shim it, on top of the es6-shim.
I am using
es6-shim
on some old Android device and I am experiencing errors when trying to call Promise.finally:The following code outputs
catch,then,constructor
on my old Android device and outputscatch,then,finally,constructor
on a modern PC browser.It seems that
Promise.finally
has not been implemented yet?