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

- old
+ new

@@ -11,13 +11,13 @@ var CreateIterResultObject = require('./CreateIterResultObject'); var Get = require('./Get'); var GetMethod = require('./GetMethod'); var IteratorNext = require('./IteratorNext'); var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); -var Type = require('./Type'); -var isIteratorRecord = require('../helpers/records/iterator-record'); +var isObject = require('../helpers/isObject'); +var isIteratorRecord = require('../helpers/records/iterator-record-2023'); var SLOT = require('internal-slot'); var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { next: function next(value) { @@ -67,11 +67,11 @@ if (valueIsPresent) { // step 8 result = Call(iteratorReturn, syncIterator, [value]); // step 8.a } else { // step 9 result = Call(iteratorReturn, syncIterator); // step 9.a } - if (Type(result) !== 'Object') { // step 11 + if (!isObject(result)) { // step 11 Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a return; } resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 @@ -103,10 +103,10 @@ if (valueIsPresent) { // step 8 result = Call(throwMethod, syncIterator, [value]); // step 8.a } else { // step 9 result = Call(throwMethod, syncIterator); // step 9.a } - if (Type(result) !== 'Object') { // step 11 + if (!isObject(result)) { // step 11 Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a return; } resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12