天天看点

hasOwnProperty出错

使用vscode写代码的时候出现ESLint报错

Do not access Object.prototype method ‘hasOwnProperty’ from target object.eslint(no-prototype-builtins)
hasOwnProperty出错

出错原因:代码不规范

修改后

hasOwnProperty出错

参考网址:

https://eslint.org/docs/latest/rules/no-prototype-builtins
hasOwnProperty出错

继续阅读