vendredi 18 août 2017

Object.values throws TypeError in IE browser

In my ember app,I am using Object.values method, which is throwing the below error in IE browser.

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

In my package.json

"ember-cli-babel": "^6.3.0" 

my target.js file shows,

module.exports = {
  browsers: [
    'ie 9',
    'last 1 Chrome versions',
    'last 1 Firefox versions',
    'last 1 Safari versions'
  ]
};

I am using

ember-cli: 2.13.3
node: 6.3.1

Object.values is supported only in EDGE. How do I polyfill this in my ember project?. Similarly for String.endsWith I just the included the polyfill in app.js file. Here I want to use babel-polyfill so that it will automatically polyfill for the browser I mentioned in target.js




Aucun commentaire:

Enregistrer un commentaire