Pārlūkot izejas kodu

Avoids unnecessary allocation

main
Eric Amodio pirms 1 gada
vecāks
revīzija
4c4d80994a
1 mainītis faili ar 6 papildinājumiem un 11 dzēšanām
  1. +6
    -11
      src/views/viewBase.ts

+ 6
- 11
src/views/viewBase.ts Parādīt failu

@ -483,17 +483,12 @@ export abstract class ViewBase<
})
async findNode(
predicate: (node: ViewNode) => boolean,
{
allowPaging = false,
canTraverse,
maxDepth = 2,
token,
}: {
options?: {
allowPaging?: boolean;
canTraverse?: (node: ViewNode) => boolean | Promise<boolean>;
maxDepth?: number;
token?: CancellationToken;
} = {},
},
): Promise<ViewNode | undefined> {
const scope = getLogScope();
@ -502,10 +497,10 @@ export abstract class ViewBase<
const node = await this.findNodeCoreBFS(
predicate,
this.ensureRoot(),
allowPaging,
canTraverse,
maxDepth,
token,
options?.allowPaging ?? false,
options?.canTraverse,
options?.maxDepth ?? 2,
options?.token,
);
return node;

Notiek ielāde…
Atcelt
Saglabāt