From 259894046c271cf70684342a79763d45734da349 Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Mon, 20 Apr 2015 12:41:29 -0700 Subject: [PATCH] [ReactNative] Skip flow checks for URLs that are not bundles --- getFlowTypeCheckMiddleware.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/getFlowTypeCheckMiddleware.js b/getFlowTypeCheckMiddleware.js index cd910054..059f0e31 100644 --- a/getFlowTypeCheckMiddleware.js +++ b/getFlowTypeCheckMiddleware.js @@ -16,7 +16,8 @@ var hasWarned = {}; function getFlowTypeCheckMiddleware(options) { return function(req, res, next) { - if (options.skipflow) { + var isBundle = req.url.indexOf('.bundle') !== -1; + if (options.skipflow || !isBundle) { return next(); } if (options.flowroot || options.projectRoots.length === 1) {