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: Prevent infinity loops errors by validating challengeData #297

Conversation

eremia2001
Copy link
Contributor

@eremia2001 eremia2001 commented Oct 28, 2024

Description

This pull request fixes a bug in the edit-[challenge].vue component where the challengeData object was not properly initialized and validated. The issue caused methods like .trim() to be called on undefined values, leading to a TypeError. This change ensures that challengeData is properly checked before accessing its properties, thus preventing errors related to undefined attributes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Translation updates (fix/improve or add new translations)

Fixes Bootstrap-Academy/Bootstrap-Academy#149

My Bootstrap Academy username: eremiya01

@eremia2001 eremia2001 changed the title fix: Prevent infinity loops errors by validating challengeData in fix: Prevent infinity loops errors by validating challengeData Oct 29, 2024
@Lauritz-Tieste
Copy link
Contributor

Good work! It works wonderfully (even without the Nuxt version update).
Unfortunately I don't have the rights to create a review and I can't merge the code.

@Defelo
Copy link
Member

Defelo commented Oct 30, 2024

@eremia2001 why did you change the package-lock.json? If the changes there are not required to solve this issue, please revert these changes.

@eremia2001
Copy link
Contributor Author

@Defelo Hey, i had some synching issues thats why .But i am going to revert the changes if its not needed

@Defelo
Copy link
Member

Defelo commented Oct 30, 2024

@Lauritz-Tieste could you test this again please, so we can merge this?

Copy link

Preview deployed to https://ef2fead1.academy-preview.pages.dev (total size: 14M)

@eremia2001
Copy link
Contributor Author

i also tested it once again. it works as before . I apologize for the mess .

@Lauritz-Tieste
Copy link
Contributor

Yeah, everything works! 👍

@Defelo Defelo merged commit 6ed5bb7 into Bootstrap-Academy:develop Oct 30, 2024
2 checks passed
@TheMorpheus407
Copy link
Contributor

@eremia2001 Du darfst mir sehr gerne auch die Rechnung per Mail stellen - alle Infos dazu hier

Danke fürs mitmachen! Und ich hoffe, du hattest Spaß und machst weiterhin mit :)

@eremia2001
Copy link
Contributor Author

Vielen lieben Dank! ❤️
Ich hatte sehr viel Spaß und bedanke mich für die Möglichkeit diese Erfahrung zu sammeln.
Ich schicke dir bald die Rechnung.

@eremia2001
Copy link
Contributor Author

`SYVFH´RAQ2vX:FKG´gmZoXLvJgq4Gi§V´jf´epvMVJoE

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.

Page crash / infinity loop on Challenges page
4 participants