Skip to content

Commit

Permalink
Merge pull request #153 from h5p/ji-3620-refactor-glorified-loop
Browse files Browse the repository at this point in the history
JI-3620 Refactor use of glorified loop
  • Loading branch information
thomasmars committed Aug 22, 2022
2 parents d9eef44 + 3cd50b9 commit 53dc7bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/h5peditor-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ ns.Form.prototype.setSubContentDefaultLanguage = function (params, lang) {
const self = this;

if (Array.isArray(params)) {
params = params.map(function (listItem) {
return self.setSubContentDefaultLanguage(listItem, lang);
});
for (let i; i < params.length; i++) {
params[i] = self.setSubContentDefaultLanguage(params[i], lang);
}
}
else if (typeof params === 'object') {
if (params.metadata) {
Expand Down

0 comments on commit 53dc7bd

Please sign in to comment.