一个小bug

This commit is contained in:
Xu Chang 2025-07-19 13:15:01 +08:00
parent b880bc659b
commit a7a3122be5
5 changed files with 14 additions and 8 deletions

View File

@ -314,7 +314,7 @@ export declare class RunningTree<ED extends EntityDict & BaseEntityDict> extends
update<T extends keyof ED>(path: string, data: ED[T]['Update']['data'], action?: ED[T]['Action']): void;
remove(path: string): void;
isLoading(path: string): boolean | undefined;
isLoadingMore(path: string): boolean | undefined;
isLoadingMore(path: string): boolean;
isExecuting(path: string): boolean;
isListChildOrStale(path: string): boolean;
private isInModiNextBranch;

View File

@ -2173,8 +2173,10 @@ export class RunningTree extends Feature {
}
isLoadingMore(path) {
const node = this.findNode(path);
assert(!node || (node instanceof ListNode));
return node?.isLoadingMore();
if (node instanceof ListNode) {
return node?.isLoadingMore();
}
return false;
}
isExecuting(path) {
const node = this.findNode(path);

View File

@ -314,7 +314,7 @@ export declare class RunningTree<ED extends EntityDict & BaseEntityDict> extends
update<T extends keyof ED>(path: string, data: ED[T]['Update']['data'], action?: ED[T]['Action']): void;
remove(path: string): void;
isLoading(path: string): boolean | undefined;
isLoadingMore(path: string): boolean | undefined;
isLoadingMore(path: string): boolean;
isExecuting(path: string): boolean;
isListChildOrStale(path: string): boolean;
private isInModiNextBranch;

View File

@ -2176,8 +2176,10 @@ class RunningTree extends Feature_1.Feature {
}
isLoadingMore(path) {
const node = this.findNode(path);
(0, assert_1.assert)(!node || (node instanceof ListNode));
return node?.isLoadingMore();
if (node instanceof ListNode) {
return node?.isLoadingMore();
}
return false;
}
isExecuting(path) {
const node = this.findNode(path);

View File

@ -2643,8 +2643,10 @@ export class RunningTree<ED extends EntityDict & BaseEntityDict> extends Feature
isLoadingMore(path: string) {
const node = this.findNode(path);
assert(!node || (node instanceof ListNode));
return node?.isLoadingMore();
if (node instanceof ListNode) {
return node?.isLoadingMore();
}
return false;
}
isExecuting(path: string) {