screeps-timeseries 0.0.6 → 0.0.8

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.
@@ -83,4 +83,5 @@
83
83
  "test/setup-mocha.js"
84
84
  ],
85
85
  "search.useIgnoreFiles": false,
86
+ "js/ts.tsdk.path": "./node_modules/typescript/lib",
86
87
  }
package/dist/index.js CHANGED
@@ -3789,7 +3789,7 @@ class TimeSeriesDataEngine {
3789
3789
  }
3790
3790
  // push data
3791
3791
  if (!this.seriesDataNodeListReadCache[key]) {
3792
- this.seriesDataNodeListReadCache[key] = Object.assign(Object.assign({}, value), { data: [] });
3792
+ this.seriesDataNodeListReadCache[key] = Object.assign(Object.assign({}, value), { data: [...new Array(this.storeNumReadCache).fill(null)] });
3793
3793
  }
3794
3794
  if (this.seriesDataNodeListReadCache[key].mutations) {
3795
3795
  delete this.seriesDataNodeListReadCache[key].mutations;
@@ -3803,7 +3803,7 @@ class TimeSeriesDataEngine {
3803
3803
  });
3804
3804
  this.storeNumReadCache += seriesDataHere.storeNum;
3805
3805
  Object.entries(this.seriesDataNodeListReadCache).forEach(([key, value]) => {
3806
- // 将不存在的数据补全为null
3806
+ // 将该份cache不存在的数据补全为null
3807
3807
  const { data } = value;
3808
3808
  // console.log(`${dataId}, ${key}:${data.length}, ${data}`);
3809
3809
  if (data.length < this.storeNumReadCache) {