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: Insert const in for...of loop #8732

Merged
merged 2 commits into from
Jun 25, 2023
Merged

Conversation

drikusroor
Copy link
Contributor

I uncommented those lines (41-58 in seed.ts) as I wanted to create some users in my seeder and it didn't work as expected. After inserting that const before user, everything worked according to plan. It's also according to the for...of docs as far as I know.

Perhaps it would have been fine in old school javascript or in coffeescript, but I don't think y'all are aiming for that 😊

@Tobbe Tobbe added the release:fix This PR is a fix label Jun 25, 2023
@Tobbe
Copy link
Member

Tobbe commented Jun 25, 2023

@drikusroor Thanks for the fix! 🙂

Just need to take care of our test project too.
Simply run yarn rebuild-test-project-fixture and then update this PR with the changes it makes
(Or you can manually update the seed file in __fixtures__/test-project/scripts/seed.ts which will be much faster)

@drikusroor
Copy link
Contributor Author

@drikusroor Thanks for the fix! 🙂

Just need to take care of our test project too. Simply run yarn rebuild-test-project-fixture and then update this PR with the changes it makes (Or you can manually update the seed file in __fixtures__/test-project/scripts/seed.ts which will be much faster)

Thanks, I overlooked that one indeed!

@Tobbe
Copy link
Member

Tobbe commented Jun 25, 2023

Thanks, I overlooked that one indeed!

We all do. That's why we added a CI job to check it for us 😅

@Tobbe Tobbe enabled auto-merge (squash) June 25, 2023 17:16
@Tobbe Tobbe merged commit 33dc441 into redwoodjs:main Jun 25, 2023
26 checks passed
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Jun 25, 2023
@drikusroor drikusroor deleted the fix/seed-file branch June 25, 2023 17:51
jtoar pushed a commit that referenced this pull request Jun 27, 2023
* fix: Insert const in for...of loop

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of

* fix: Insert const in for...of loop in test-project as well
@jtoar jtoar modified the milestones: next-release, v5.4.0 Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants