-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix #1098: Some code uses $.each, some uses Array.prototype.forEach #3087
Conversation
Community pull request - open to anyone to grab. |
i'll look at it |
@WebsiteDeveloper just to be clear, we will need a code review from a Brackets committer also before landing this. But still feel free to review it -- an extra set of eyes to point out issues never hurts! |
Assigning to myself... @WebsiteDeveloper, I'll be tagging along with you for this one. Please, feel free to review and voice your concerns, if any. I'll go over it myself later today or tomorrow and do the same, and then we'll iterate until everything looks good before merging, as usual ;) |
@peterflynn i did know that, but as you said i'll just look at it |
Simple, but could break anything if using the wrong forEach. Anyway I did tested everything and run the tests before submitting it. There are still a couple of |
As i'm a fan of consistency i would say yes, because generally consistency makes i a lot easier for new developers to understand the code, also it makes the code more maintainable. |
@TomMalbran I think we only have Other than that, this is good to go. |
@jbalsas Yes, those where the ones I was referring too, since I already replaced the Strings ones. I replaced those too. Should be good to go :) |
@WebsiteDeveloper Thanks for your help with the review! Keep your eyes open, surely more like this are on their way ;) Looks good to me. Merging. |
Fix #1098: Some code uses $.each, some uses Array.prototype.forEach
@TomMalbran By the way, I just realized that you're still using your personal fork of Brackets to create your pull requests. I think should be able to create branches directly in this main repo if that's an easier workflow for you. |
Right. I think I am just used to do it like this, and since I am somehow still new to git I would need to learn how to do it. And thanks for the review. |
This fixes #1098 by replacing every
$.each
in the core code with eitherArray.forEach
for arrays orCollectionUtils.forEach
for objects. The remaining$.each
are only in jQuery.