-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor turtle access in EnsembleBlocks #5415
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
base: master
Are you sure you want to change the base?
Conversation
|
✅ All Jest tests passed! This PR is ready to merge. |
|
Hi @7se7en72025, nice catch on the turtle indexing bug! 🚀 I noticed the checks are failing on the Lint step. This is likely because PR #5388 recently updated the project's formatting rules (Prettier v6). The CI is now enforcing the new style, which conflicts with the old formatting in this file. If you run |
|
Hi @Inuth0603, |
|
Ah, I see! This happens because your local Since PR #5388 merged recently, you need to refresh your environment to get the new Prettier v6 rules. Try this:
That should force the new formatting changes to appear! 🚀 |
|
sorry but i tried it, the result was same tho |
|
Hey @7se7en72025, this has happened to me as well. I have checked your ESLint Errors, and it seems like the error is because of 3 files you never touched. I suggest you run Prettier on them and commit. Try: |
Simplified turtle object access in the arg method by using the already found turtle instead of re-fetching it. Also reformatted assignment for singer.turtleTime for better readability. Refactor object keys and formatting in JS files Updated test and code files to use numeric keys instead of string keys for object properties where appropriate. Improved code formatting for better readability in turtle.js and script.js.
ed7cfa6 to
c7bd424
Compare
|
✅ All Jest tests passed! This PR is ready to merge. |
|
W @Inuth0603 @kartikktripathi |
|
No problem, cheers to open source! |
When a user used the mouse notes played block to query a specific turtle (e.g., targeting "Mr. Mouse"), the code would incorrectly pass a Turtle object into activity.turtles.ithTurtle(), which expects an integer index. This was a failure and a crash (Error: Turtle [object Object] not found).