Skip to content

Commit

Permalink
use forEach to loop through elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Snir David committed May 1, 2016
1 parent a239fdd commit 8211294
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dist/cron-ui.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/cron-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ CronUI.prototype.render = function() {

// Atttach the change event to all selectors
for (var blockName in blocks) {
for (var selectEl of blocks[blockName].querySelectorAll('select')) {
[].forEach.call(blocks[blockName].querySelectorAll('select'), function(selectEl) {
selectEl.addEventListener("change", this.changeEvent.bind(this));
}
}.bind(this));
}

// Save a reference to blocks
Expand Down

0 comments on commit 8211294

Please sign in to comment.