Skip to content

Commit 2685e13

Browse files
Ondoherdignifiedquire
authored andcommitted
fix(middleware): does not work with mootools (#2591)
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.
1 parent 3263c06 commit 2685e13

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/middleware/karma.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ var createKarmaMiddleware = function (
179179
var filePath = file.path
180180
var fileExt = path.extname(filePath)
181181

182+
if (!files.included.hasOwnProperty(i)) {
183+
continue
184+
}
185+
182186
if (!file.isUrl) {
183187
filePath = filePathToUrlPath(filePath, basePath, urlRoot, proxyPath)
184188

0 commit comments

Comments
 (0)