HarshCasper / Rotten-Scripts

Scripts that will make you go WOW!
MIT License
1.47k stars 491 forks source link

`Object.prototype` builtins should not be used directly[Bug]: #1278

Closed VenkatsQuest closed 2 years ago

VenkatsQuest commented 2 years ago

Is there an existing issue for this?

Current Behavior

73 dbData = (dbData === "" || dbData.length == 0) ? "{}" : dbData; 74 dbData = JSON.parse(dbData); 75 76 if (dbData.hasOwnProperty(user.name)) { 77 // display basic info 78 displayUser(user); 79

Expected Behavior

let hasBarProperty = Object.prototype.hasOwnProperty.call(obj, "property");

To Reproduce

code quality issue

Anything else?

No response

Code of Conduct

github-actions[bot] commented 2 years ago

@VenkatsQuest Welcome to Rotten-Scripts🥳 Thanks for opening this Issue 🙌, This Will definitely Improve our Project💖.While we are having a look at this. If you want to work on this then,feel free to self-assign and start working on it.📄 Use /assign to self-assign this issue.