From 449097d0024e313fb40e40cfa466418db5330883 Mon Sep 17 00:00:00 2001 From: Glenn Date: Thu, 2 Mar 2017 13:56:16 -0800 Subject: [PATCH] fix(middleware): does not work with mootools 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)