Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-09-16 17:29:58 +00:00
parent 1afca056e3
commit 6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions

View file

@ -1,10 +1,10 @@
'use strict';
var has = require('has');
var $TypeError = require('es-errors/type');
var Type = require('./Type');
var hasOwn = require('hasown');
var assertRecord = require('../helpers/assertRecord');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
@ -13,9 +13,11 @@ module.exports = function IsDataDescriptor(Desc) {
return false;
}
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}