Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Change for in to a regular for #71

Merged
merged 4 commits into from Apr 22, 2012

Conversation

Projects
None yet
2 participants
Contributor

Akkuma commented Apr 18, 2012

for (var s in services) was dangerous as it didn't do a hasOwnProperty check, creating an error within TowerJS while using Passport. Additionally, s was only being used as the index anyway, so switched to a regular for loop.

Akkuma added some commits Apr 18, 2012

for (var s in services) was dangerous as it didn't do a hasOwnPropert…
…y check, creating an error within TowerJS. Additionally, s was only being used as the index anyway, so switched to a regular for loop.
Another instance of for in that didn't use a hasOwnProperty and was s…
…imple index accessing. Plus for in is slower than a normal for loop.

havard added a commit that referenced this pull request Apr 22, 2012

Merge pull request #71 from Akkuma/patch-1
Change for in to a regular for

@havard havard merged commit b5db817 into havard:master Apr 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment