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.
- package/.vscode/settings.json +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/engine.ts +2 -2
package/.vscode/settings.json
CHANGED
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
|
-
//
|
|
3806
|
+
// 将该份cache不存在的数据补全为null
|
|
3807
3807
|
const { data } = value;
|
|
3808
3808
|
// console.log(`${dataId}, ${key}:${data.length}, ${data}`);
|
|
3809
3809
|
if (data.length < this.storeNumReadCache) {
|