From b89cf6768f793071d8a2fdd3622ab247c92ab8a8 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 15 May 2015 01:57:10 +0100 Subject: [PATCH] fix shouldIgnore only matches switch --- src/babel/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/babel/util.js b/src/babel/util.js index 59ca726874..ba0bc1ad3d 100644 --- a/src/babel/util.js +++ b/src/babel/util.js @@ -114,8 +114,8 @@ export function shouldIgnore(filename, ignore, only) { if (only.length) { var matches = false; - for (var pattern of (only: Array)) { - for (let filename of (filenames: Array)) { + for (let filename of (filenames: Array)) { + for (var pattern of (only: Array)) { if (pattern.test(filename)) { matches = true; break; @@ -123,7 +123,7 @@ export function shouldIgnore(filename, ignore, only) { } } - return matches; + return !matches; } else if (ignore.length) { for (let filename of (filenames: Array)) { for (var pattern of (ignore: Array)) {