Skip to content

Conversation

@mkoistinen
Copy link

Removed “filth” by replacing for() with while().

Removed “filth” by replacing for() with while().
@remy
Copy link
Owner

remy commented Mar 7, 2013

(have to say, not keen on the moving commas to leading instead of trailing - but either way - there's a pretty serious bug in your code!).

The while loop is going to break in this case: http://jsbin.com/atocep/11/edit

You're looping whilst there's selects found on the page, but you only replaceChild when the data-type="range" so a normal select won't get replaced and your code goes in to an infinite loop. Unless I've missed something...

@mkoistinen
Copy link
Author

Ah, right you are. My use case has selects only that are set to be ranges. Can you cherry-pick the change to fix the precision vs. step, or shall I close this and resubmit?

(and yeah, I think you and I have a lot of different preferences for code style! ;-)

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.

2 participants