diff --git a/.eslintrc.js b/.eslintrc.js index 59afd2b1..946c5b28 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -174,7 +174,7 @@ module.exports = { "off", "always" ], - "guard-for-in": "off", //"error", + "guard-for-in": "error", "id-blacklist": "off", "id-match": "off", "import/order": "off", diff --git a/src/excmds.ts b/src/excmds.ts index 1b4567cb..2093514f 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -3625,7 +3625,8 @@ export async function sanitise(...args: string[]) { */ } if (args.find(x => x === "all") !== undefined) { - for (const attr in dts) dts[attr] = true + for (const attr in dts) + if (Object.prototype.hasOwnProperty.call(dts, attr)) dts[attr] = true } else { // We bother checking if dts[x] is false because // browser.browsingData.remove() is very strict on the format of the