babel / babel-preset-env

PSA: this repo has been moved into babel/babel -->

Home Page:https://github.com/babel/babel/tree/master/packages/babel-preset-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

includes function not work in dynamic param

HCLQ opened this issue · comments

commented

I use the babel-preset-env@next
and set
"presets": [
[
"env",
{
"targets": {
"browsers": ["ie >=9"]
},
"useBuiltIns": "usage"
}
]
]

when use the [].includes or "".includes like this:

function test( param ){
var otherObject=someFn.get();
otherObject. includes (param);
}
test ("?")

in Ie it will throw an error the object has no includes function

This issue has been moved to babel/babel#6598.