node_modules/es-abstract/2020/ToPropertyDescriptor.js in immosquare-cleaner-0.1.60 vs node_modules/es-abstract/2020/ToPropertyDescriptor.js in immosquare-cleaner-0.1.61

- old
+ new

@@ -2,17 +2,18 @@ var hasOwn = require('hasown'); var $TypeError = require('es-errors/type'); -var Type = require('./Type'); -var ToBoolean = require('./ToBoolean'); var IsCallable = require('./IsCallable'); +var ToBoolean = require('./ToBoolean'); +var isObject = require('../helpers/isObject'); + // https://262.ecma-international.org/5.1/#sec-8.10.5 module.exports = function ToPropertyDescriptor(Obj) { - if (Type(Obj) !== 'Object') { + if (!isObject(Obj)) { throw new $TypeError('ToPropertyDescriptor requires an object'); } var desc = {}; if (hasOwn(Obj, 'enumerable')) {