Add missing es7.promise.finally polyfill when using useBuiltIns: usage (#8500)
Usage of a `finally` instance method should trigger import of the `es7.promise.finally` polyfill, but it doesn't. This PR adds the missing definition and a test.
This commit is contained in:
parent
b439013cd4
commit
8874c5c481
@ -46,6 +46,7 @@ export const definitions = {
|
||||
every: ["es6.array.is-array"],
|
||||
fill: ["es6.array.fill"],
|
||||
filter: ["es6.array.filter"],
|
||||
finally: ["es7.promise.finally"],
|
||||
find: ["es6.array.find"],
|
||||
findIndex: ["es6.array.find-index"],
|
||||
fixed: ["es6.string.fixed"],
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
var p = Promise.resolve(0);
|
||||
p.finally(() => {
|
||||
alert("OK");
|
||||
});
|
||||
@ -0,0 +1,14 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"../../../../lib",
|
||||
{
|
||||
"targets": {
|
||||
"browsers": ["ie > 10"]
|
||||
},
|
||||
"useBuiltIns": "usage",
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es6.promise";
|
||||
var p = Promise.resolve(0);
|
||||
p.finally(function () {
|
||||
alert("OK");
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user