Fix hasBeenWarned condition. (#175)

This commit is contained in:
Artem Yavorsky 2017-02-27 17:12:02 +02:00 committed by Henry Zhu
parent 2d1768209d
commit 1bc8325679

View File

@ -4,8 +4,6 @@ import defaultInclude from "./default-includes";
import moduleTransformations from "./module-transformations";
import pluginFeatures from "../data/plugin-features";
const hasBeenWarned = false;
const validIncludesAndExcludes = [
...Object.keys(pluginFeatures),
...Object.keys(moduleTransformations).map((m) => moduleTransformations[m]),
@ -13,6 +11,8 @@ const validIncludesAndExcludes = [
...defaultInclude
];
let hasBeenWarned = false;
export const validateIncludesAndExcludes = (opts = [], type) => {
invariant(
Array.isArray(opts),
@ -76,6 +76,7 @@ export default function normalizeOptions(opts) {
`Deprecation Warning: The "whitelist" option has been deprecated in favor of "include" to
match the newly added "exclude" option (instead of "blacklist").`
);
hasBeenWarned = true;
}
invariant(