@daneren2005/shared-memory-objects 0.0.20 → 0.0.21

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.
@@ -1137,9 +1137,9 @@ class m {
1137
1137
  this.firstBlock.data[d] = 0;
1138
1138
  }
1139
1139
  *[Symbol.iterator]() {
1140
- let t = this.getFullDataBlock(), e = this.dataLength;
1141
- for (let r = 0; r < this.length; r += e)
1142
- yield t.subarray(r, r + e);
1140
+ let t = this.getFullDataBlock(), e = this.dataLength, r = this.length * e;
1141
+ for (let s = 0; s < r; s += e)
1142
+ yield t.subarray(s, s + e);
1143
1143
  }
1144
1144
  // Significantly faster but won't be thread safe if anything is removing/adding to it during iteration
1145
1145
  getCurrentArray() {