Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
don't use a for...in loop over options object
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Oct 19, 2017
1 parent 3fce813 commit 8587b1c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion iframe/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
if (typeof theme == 'object') {
var keys = Object.keys(theme);
var key;

for (var i = 0; i < keys.length; i++) {
key = keys[i];
themeObj[key] = theme[key];
Expand Down Expand Up @@ -220,7 +221,13 @@
debug: false,
},
init: function(options) {
for (var k in options) this.options[k] = options[k];
var keys = Object.keys(options);
var key;

for (var k = 0; k < keys.length; k++) {
key = keys[k];
this.options[key] = options[key];
}

renderContent.call(this, getTheme(this.options.theme));

Expand Down

0 comments on commit 8587b1c

Please sign in to comment.