mirror of
https://github.com/motajs/template.git
synced 2026-11-12 14:04:31 +08:00
fix(07-07): #06-09-5 warn code 178 for unloaded save keys
- core.ts loadState: 差集方向改为 loaded.difference(total),178 = 存档出现但未加载的 key - saveablesRoundTrip.test.ts:322-334 改写为「缺 key 不触发 178、仍触发 177」负向见证并更名 - saveablesRoundTrip.test.ts:337-349 取消 it.skip,承担「多出 key 触发 178」正向见证
This commit is contained in:
1 parent
115d835b56
commit
95ea6609c6
2 files changed
+8
-6
No files matched your search
@@ -530,7 +530,7 @@ export class CoreState implements ICoreState {
|
||||
}
|
||||
const loaded = new Set<string>(state.keys());
|
||||
const total = new Set(this.saveables.keys());
|
||||
const remain = total.difference(loaded);
|
||||
const remain = loaded.difference(total);
|
||||
if (remain.size > 0) {
|
||||
const ids = [...remain].join(' | ');
|
||||
logger.warn(178, ids);
|
||||
|
||||
Reference in new issue
Block a user