@soundworks/core 4.0.0-alpha.12 → 4.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soundworks/core",
3
- "version": "4.0.0-alpha.12",
3
+ "version": "4.0.0-alpha.13",
4
4
  "description": "Open-source creative coding framework for distributed applications based on Web technologies",
5
5
  "authors": [
6
6
  "Benjamin Matuszewski",
@@ -195,10 +195,11 @@ class BaseSharedStateCollection {
195
195
 
196
196
  return {
197
197
  next: () => {
198
- const value = this._states[index++];
199
- const done = index >= this._states.length;
200
-
201
- return { value, done };
198
+ if (index >= this._states.length) {
199
+ return { value: undefined, done: true };
200
+ } else {
201
+ return { value: this._states[index++], done: false };
202
+ }
202
203
  }
203
204
  }
204
205
  }