有个边界没处理好

This commit is contained in:
Xu Chang 2025-04-24 15:22:59 +08:00
parent bd8eca9943
commit ac57e2473d
3 changed files with 12 additions and 6 deletions

View File

@ -1923,11 +1923,13 @@ export class RunningTree extends Feature {
createNode(options, isPage) {
const { entity, pagination, path: fullPath, filters, sorters, projection, isList, id, getTotal, zombie, stale, } = options;
const rollback = this.begin();
this.redoBranchModis(fullPath);
this.redoBranchOperations(fullPath);
let node;
const { parent, path } = analyzePath(fullPath);
const parentNode = parent ? this.findNode(parent) : undefined;
if (parentNode) {
this.redoBranchModis(fullPath);
this.redoBranchOperations(fullPath);
}
node = this.findNode(fullPath);
// 找到了之前的node需要检查是否需要重用
if (node) {

View File

@ -1926,11 +1926,13 @@ class RunningTree extends Feature_1.Feature {
createNode(options, isPage) {
const { entity, pagination, path: fullPath, filters, sorters, projection, isList, id, getTotal, zombie, stale, } = options;
const rollback = this.begin();
this.redoBranchModis(fullPath);
this.redoBranchOperations(fullPath);
let node;
const { parent, path } = analyzePath(fullPath);
const parentNode = parent ? this.findNode(parent) : undefined;
if (parentNode) {
this.redoBranchModis(fullPath);
this.redoBranchOperations(fullPath);
}
node = this.findNode(fullPath);
// 找到了之前的node需要检查是否需要重用
if (node) {

View File

@ -2325,11 +2325,13 @@ export class RunningTree<ED extends EntityDict & BaseEntityDict> extends Feature
stale,
} = options;
const rollback = this.begin();
this.redoBranchModis(fullPath);
this.redoBranchOperations(fullPath);
let node: ListNode<ED, T> | SingleNode<ED, T> | VirtualNode<ED> | undefined;
const { parent, path } = analyzePath(fullPath);
const parentNode = parent ? this.findNode(parent) : undefined;
if (parentNode) {
this.redoBranchModis(fullPath);
this.redoBranchOperations(fullPath);
}
node = this.findNode(fullPath) as (ListNode<ED, T>
| SingleNode<ED, T>
| VirtualNode<ED>