@lit-labs/ssr
Advanced tools
Comparing version 3.1.6 to 3.1.7
@@ -22,2 +22,3 @@ /** | ||
private _iterators; | ||
private _currentIterator?; | ||
constructor(result: RenderResult); | ||
@@ -24,0 +25,0 @@ _read(_size: number): Promise<void>; |
@@ -41,9 +41,10 @@ /** | ||
// and resume on the next call to _read(). | ||
// Get the current iterator | ||
let iterator = this._iterators.pop(); | ||
while (iterator !== undefined) { | ||
const next = iterator.next(); | ||
// Get the current iterator, only if we don't already have one from the | ||
// previous call to _read() | ||
this._currentIterator ?? (this._currentIterator = this._iterators.pop()); | ||
while (this._currentIterator !== undefined) { | ||
const next = this._currentIterator.next(); | ||
if (next.done === true) { | ||
// Restore the outer iterator | ||
iterator = this._iterators.pop(); | ||
this._currentIterator = this._iterators.pop(); | ||
continue; | ||
@@ -61,4 +62,4 @@ } | ||
// Must be a Promise | ||
this._iterators.push(iterator); | ||
iterator = (await value)[Symbol.iterator](); | ||
this._iterators.push(this._currentIterator); | ||
this._currentIterator = (await value)[Symbol.iterator](); | ||
} | ||
@@ -65,0 +66,0 @@ } |
{ | ||
"name": "@lit-labs/ssr", | ||
"type": "module", | ||
"version": "3.1.6", | ||
"version": "3.1.7", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
225543
2116