处理了node.clean的边界
This commit is contained in:
parent
e9891ac095
commit
a15a03cabd
|
|
@ -2500,13 +2500,13 @@ export class RunningTree extends Feature {
|
|||
const { root } = analyzePath(path);
|
||||
this.invalidateCachedOperations(root);
|
||||
while (true) {
|
||||
const parent = node.getParent();
|
||||
if (parent && parent.checkIfClean(node)) {
|
||||
const parent = node?.getParent();
|
||||
if (parent && node && parent.checkIfClean(node)) {
|
||||
node = parent;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
node.clean(lsn, dontPublish);
|
||||
node?.clean(lsn, dontPublish);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2503,13 +2503,13 @@ class RunningTree extends Feature_1.Feature {
|
|||
const { root } = analyzePath(path);
|
||||
this.invalidateCachedOperations(root);
|
||||
while (true) {
|
||||
const parent = node.getParent();
|
||||
if (parent && parent.checkIfClean(node)) {
|
||||
const parent = node?.getParent();
|
||||
if (parent && node && parent.checkIfClean(node)) {
|
||||
node = parent;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
node.clean(lsn, dontPublish);
|
||||
node?.clean(lsn, dontPublish);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3065,18 +3065,18 @@ export class RunningTree<ED extends EntityDict & BaseEntityDict> extends Feature
|
|||
* @param dontPublish
|
||||
*/
|
||||
clean(path: string, lsn?: number, dontPublish?: true) {
|
||||
let node = this.findNode(path)!;
|
||||
let node = this.findNode(path);
|
||||
const { root } = analyzePath(path);
|
||||
this.invalidateCachedOperations(root);
|
||||
|
||||
while (true) {
|
||||
const parent = node.getParent();
|
||||
if (parent && parent.checkIfClean(node)) {
|
||||
const parent = node?.getParent();
|
||||
if (parent && node && parent.checkIfClean(node)) {
|
||||
node = parent;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
node.clean(lsn, dontPublish);
|
||||
node?.clean(lsn, dontPublish);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue