Skip to content

Commit

Permalink
fix(middleware): does not work with mootools (#2591)
Browse files Browse the repository at this point in the history
Change karma.js to check for own property during for...in loop
Because mootools adds functions to the array prototype,
the use of for..in will get more than the array elements.
  • Loading branch information
Ondoher authored and dignifiedquire committed Apr 5, 2017
1 parent 3263c06 commit 2685e13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/middleware/karma.js
Expand Up @@ -179,6 +179,10 @@ var createKarmaMiddleware = function (
var filePath = file.path
var fileExt = path.extname(filePath)

if (!files.included.hasOwnProperty(i)) {
continue
}

if (!file.isUrl) {
filePath = filePathToUrlPath(filePath, basePath, urlRoot, proxyPath)

Expand Down

0 comments on commit 2685e13

Please sign in to comment.