Skip to content

Commit

Permalink
for..in was not working with mootools because it adds functions to th…
Browse files Browse the repository at this point in the history
…e array prototype.

Using forEach instead.
  • Loading branch information
Ondoher committed Mar 2, 2017
1 parent cb5c0bb commit 03399aa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/middleware/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ var createKarmaMiddleware = function (

var scriptTags = []
var scriptUrls = []
for (var i in files.included) {
var file = files.included[i]
files.included.forEach(function(file) {
var filePath = file.path
var fileExt = path.extname(filePath)

Expand All @@ -191,12 +190,12 @@ var createKarmaMiddleware = function (

if (fileExt === '.css') {
scriptTags.push(util.format(LINK_TAG_CSS, filePath))
continue
return
}

if (fileExt === '.html') {
scriptTags.push(util.format(LINK_TAG_HTML, filePath))
continue
return
}

// The script tag to be placed
Expand All @@ -209,7 +208,7 @@ var createKarmaMiddleware = function (

var crossOriginAttribute = includeCrossOriginAttribute ? CROSSORIGIN_ATTRIBUTE : ''
scriptTags.push(util.format(SCRIPT_TAG, scriptType, filePath, crossOriginAttribute))
}
})

// TODO(vojta): don't compute if it's not in the template
var mappings = files.served.map(function (file) {
Expand Down

0 comments on commit 03399aa

Please sign in to comment.