Resolve "Auth providers should be ready on components init"

This commit is contained in:
Jovan Krunić
2022-05-13 09:05:33 +00:00
parent 28caaf1d21
commit b7ae2cf019
11 changed files with 77 additions and 96 deletions

View File

@@ -53,7 +53,7 @@ export type ICalLike = ICalKeyValuePair[];
/**
*
*/
function timeDist(
function timeDistance(
current: SCISO8601Date,
next: SCISO8601Date | undefined,
recurrence: unitOfTime.Diff,
@@ -127,11 +127,11 @@ export function findRRules(
const freq = minBy(
units.map(recurrence => ({
recurrence: recurrence,
dist: timeDist(current, next, recurrence),
dist: timeDistance(current, next, recurrence),
})),
it => it.dist,
)?.recurrence;
const interval = freq ? timeDist(current, next, freq) : undefined;
const interval = freq ? timeDistance(current, next, freq) : undefined;
if (element?.interval === -1) {
element.freq = freq;