React项目TypeError: 对象不支持“isNaN”属性或方法

React项目在IE上运行时出现错误——TypeError: 对象不支持“isNaN”属性或方法

解决办法是在html文件的head部分添加如下内容:

<!-- Polyfills -->
<!--[if lt IE 10]>
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.5.7/es5-shim.min.js,es5-shim/4.5.7/es5-sham.min.js,es6-shim/0.35.1/es6-sham.min.js,es6-shim/0.35.1/es6-shim.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
<![endif]-->
<script src="https://as.alipayobjects.com/g/component/??es6-shim/0.35.1/es6-sham.min.js,es6-shim/0.35.1/es6-shim.min.js"></script>

  



猜你喜欢

转载自www.cnblogs.com/chhq1973/p/9130498.html