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(wrapped): fix crash when history is empty #2508

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

alexandregv
Copy link
Contributor

@alexandregv alexandregv commented Dec 29, 2024

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

Details

I noticed a crash when there is no history entries for the specified year, 2023 in my case, so I added a simple check and message.
I'm not sure of the behavior if someone has no history for 2023 but has some for 2024 and does a atuin import. If it's not recommened, please let me know and I will update the error message. Feel free to change it too.

Before:
image

After:
image

Copy link
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

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

Ohhh yes, nice catch. Thank you for this! 🥳

@ellie ellie merged commit 522c167 into atuinsh:main Jan 7, 2025
19 checks passed
@alexandregv alexandregv deleted the fix/wrapped-empty-history branch January 7, 2025 21:05
enchantednatures pushed a commit to enchantednatures/atuin that referenced this pull request Jan 16, 2025
* fix(wrapped): fix crash when history is empty

* style: fix format
enchantednatures pushed a commit to enchantednatures/atuin that referenced this pull request Jan 16, 2025
* fix(wrapped): fix crash when history is empty

* style: fix format
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.

2 participants