Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2021/OrdinaryToPrimitive.js
r0c6b92a r79a0317 6 6 var Get = require('./Get'); 7 7 var IsCallable = require('./IsCallable'); 8 var Type = require('./Type'); 8 9 var isObject = require('../helpers/isObject'); 9 10 10 11 var inspect = require('object-inspect'); … … 13 14 14 15 module.exports = function OrdinaryToPrimitive(O, hint) { 15 if ( Type(O) !== 'Object') {16 if (!isObject(O)) { 16 17 throw new $TypeError('Assertion failed: Type(O) is not Object'); 17 18 } … … 27 28 if (IsCallable(method)) { 28 29 var result = Call(method, O); 29 if ( Type(result) !== 'Object') {30 if (!isObject(result)) { 30 31 return result; 31 32 }
Note:
See TracChangeset
for help on using the changeset viewer.