严格模式报错问题怎么改

Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

如题,webpack打包后控制台报错,网上查了一下说是严格模式不能使用argument,网上大多是说的argument.callee改成匿名函数,
但是像下面代码这样的怎么改?或者有什么其他方法可以不修改原代码的(该代码为第三方js文件)

 var argv = setCookie.arguments;
 var argc = setCookie.arguments.length;

PS:有说装babel-plugin-transform-remove-strict-mode,装过啦,没用还是报错
image.png

阅读 1.6k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题