Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(repeat-strategy): add missing Promise return type #2301

Merged
merged 2 commits into from Nov 28, 2023

Conversation

roggervalf
Copy link
Collaborator

@roggervalf roggervalf commented Nov 27, 2023

fixes #2300

Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -574,7 +574,7 @@ describe('repeat', function () {
}

const next_occurrence = rrule.after(currentDate, false);
return next_occurrence?.getTime();
return next_occurrence!.getTime()!;
Copy link

@eden-lane eden-lane Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be a non-null assertion? rrule.after can return null and I thought that undefined is a valid value - it means that there are no next occurrence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @eden-lane I could validate that getNextMillis function is returning undefined in some cases so this should be a valid case, I updated the typing in this case as well

@roggervalf roggervalf merged commit 6f8f534 into master Nov 28, 2023
11 checks passed
@roggervalf roggervalf deleted the type-fix-repeat-strategy branch November 28, 2023 13:41
github-actions bot pushed a commit that referenced this pull request Nov 28, 2023
## [4.14.4](v4.14.3...v4.14.4) (2023-11-28)

### Bug Fixes

* **repeat-strategy:** add missing Promise return type ([#2301](#2301)) ([6f8f534](6f8f534))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Async repeatStrategy
3 participants