Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/es-abstract/2023/ValidateAndApplyPropertyDescriptor.js

    r0c6b92a r79a0317  
    1111var IsDataDescriptor = require('./IsDataDescriptor');
    1212var IsGenericDescriptor = require('./IsGenericDescriptor');
    13 var IsPropertyKey = require('./IsPropertyKey');
     13var isPropertyKey = require('../helpers/isPropertyKey');
    1414var SameValue = require('./SameValue');
    1515var Type = require('./Type');
     16
     17var isObject = require('../helpers/isObject');
    1618
    1719// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor
     
    2224module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) {
    2325        var oType = Type(O);
    24         if (oType !== 'Undefined' && oType !== 'Object') {
     26        if (typeof O !== 'undefined' && !isObject(O)) {
    2527                throw new $TypeError('Assertion failed: O must be undefined or an Object');
    2628        }
    27         if (!IsPropertyKey(P)) {
     29        if (!isPropertyKey(P)) {
    2830                throw new $TypeError('Assertion failed: P must be a Property Key');
    2931        }
Note: See TracChangeset for help on using the changeset viewer.