From 2685e1357f457757c3fa3f5d84a837ed9a51b646 Mon Sep 17 00:00:00 2001 From: Glenn Anderson Date: Wed, 5 Apr 2017 07:38:55 -0700 Subject: [PATCH] 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. --- lib/middleware/karma.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/middleware/karma.js b/lib/middleware/karma.js index 3392096bd..831668324 100644 --- a/lib/middleware/karma.js +++ b/lib/middleware/karma.js @@ -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)