Changeset 79a0317 for imaps-frontend/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js
r0c6b92a r79a0317 11 11 var IsDataDescriptor = require('./IsDataDescriptor'); 12 12 var IsGenericDescriptor = require('./IsGenericDescriptor'); 13 var IsPropertyKey = require('./IsPropertyKey');13 var isPropertyKey = require('../helpers/isPropertyKey'); 14 14 var SameValue = require('./SameValue'); 15 15 var Type = require('./Type'); 16 17 var isObject = require('../helpers/isObject'); 16 18 17 19 // https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor … … 22 24 module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { 23 25 var oType = Type(O); 24 if ( oType !== 'Undefined' && oType !== 'Object') {26 if (typeof O !== 'undefined' && !isObject(O)) { 25 27 throw new $TypeError('Assertion failed: O must be undefined or an Object'); 26 28 } 27 if (! IsPropertyKey(P)) {29 if (!isPropertyKey(P)) { 28 30 throw new $TypeError('Assertion failed: P must be a Property Key'); 29 31 }
Note:
See TracChangeset
for help on using the changeset viewer.