Lint stuff, again
This commit is contained in:
parent
96b7ac8c55
commit
0d7ed3db2f
@ -50,7 +50,7 @@ export function checkFilter(
|
||||
validate?: (...args: unknown[]) => boolean,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
validateArgs: any = [],
|
||||
matchAll = false,
|
||||
matchAll = false
|
||||
): boolean {
|
||||
const hasChecked = filters.find(f => f.checked);
|
||||
|
||||
@ -72,8 +72,10 @@ export function checkFilter(
|
||||
return filterMatched;
|
||||
}
|
||||
|
||||
export const keyChecker = (key: string) => (entity: Record<string, string>, filter: INestedFilter) =>
|
||||
entity[key] === filter.id;
|
||||
export const keyChecker =
|
||||
(key: string) =>
|
||||
(entity: Record<string, string>, filter: INestedFilter): boolean =>
|
||||
entity[key] === filter.id;
|
||||
|
||||
export function getFilteredEntities<T>(entities: T[], filters: IFilterGroup[]): T[] {
|
||||
const filteredEntities: T[] = [];
|
||||
|
||||
@ -45,7 +45,7 @@ export class CustomRouteReuseStrategy implements RouteReuseStrategy {
|
||||
|
||||
this._storedRoutes[this._getKey(route)] = {
|
||||
handle: element as DetachedRouteHandle,
|
||||
previousRoute: route,
|
||||
previousRoute: route
|
||||
};
|
||||
}
|
||||
|
||||
@ -71,9 +71,7 @@ export class CustomRouteReuseStrategy implements RouteReuseStrategy {
|
||||
|
||||
private _getKey(route: ActivatedRouteSnapshot): string {
|
||||
return route.pathFromRoot
|
||||
.map((el: ActivatedRouteSnapshot) =>
|
||||
el.routeConfig ? el.routeConfig.path + JSON.stringify(el.params) : '',
|
||||
)
|
||||
.map((el: ActivatedRouteSnapshot) => (el.routeConfig ? `${el.routeConfig.path}${JSON.stringify(el.params)}` : ''))
|
||||
.filter(str => str.length > 0)
|
||||
.join('');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user