Seriously.js icon indicating copy to clipboard operation
Seriously.js copied to clipboard

Fix enum display in index example

Open mtraeger opened this issue 8 years ago • 2 comments

This should fix not shown enums in the index.html example in drop down menus.

mtraeger avatar Jun 27 '16 00:06 mtraeger

Thanks for submitting this. Generally looks good, but a few style nitpicks:

  1. Please declare singleOption as part of the var statement at the top of the function with the rest of the variables. (I may reconsider this style choice in the future, especially if I migrate to ES6 let and const. But I'd like to keep it consistent for now.)

  2. Please do a hasOwnProperty check inside the for...in loop?

  3. option.value = singleOption; is repeated unnecessarily. It can be placed once outside the if branch.

Thanks, B

brianchirls avatar Jul 02 '16 16:07 brianchirls

Thanks for the feedback. I hopefully interpreted 2) correctly.

mtraeger avatar Jul 04 '16 22:07 mtraeger