Mr. Raj Kale
Mr. Raj Kale

Reputation: 87

TypeError: Object doesn't support property or method 'finally'

I am using angular 1.6 with gulp and es6 promise which has .finally() block, its working fine all other except IE Edge and IE 11.

Upvotes: 5

Views: 10527

Answers (2)

Paul Grime
Paul Grime

Reputation: 15104

Some more information:

In Edge devtools for Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134:

typeof (new Promise(()=>1).finally)
"undefined"

typeof (new Promise(()=>1).then)
"function"

typeof (new Promise(()=>1).catch)
"function"

For my application I was using https://cdnjs.com/libraries/es6-promise to polyfill Promise (initially this was solely to polyfill for IE 11).

But then I noticed my app wasn't working in Edge.

Related issue - https://github.com/stefanpenner/es6-promise/issues/330#issuecomment-425233364

Now I have switched to Bluebird to polyfill for both IE 11 and Edge.

Upvotes: 1

Samuel Maisonneuve
Samuel Maisonneuve

Reputation: 1145

It doesn't seem to be supported by either of them (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally)

Upvotes: 4

Related Questions