IE does not support Array includes or String includes methods

后端 未结 7 1229
温柔的废话
温柔的废话 2020-11-29 06:04

I have been working on a project and developing a JavaScript framework. The original code is about 700 lines so I only pasted this line. The includes method doesn\'t work on

7条回答
  •  一向
    一向 (楼主)
    2020-11-29 06:12

    This Selected answer is for String, if you are looking for 'includes' on an array, I resolved my issue by adding the following to my polyfills.ts file:

    import 'core-js/es7/array';
    

提交回复
热议问题