Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Commit

Permalink
Fix hasBeenWarned condition. (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
yavorsky authored and hzoo committed Feb 27, 2017
1 parent 8086185 commit 3d4baca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/normalize-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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]),
...Object.keys(builtInsList),
...defaultInclude
];

let hasBeenWarned = false;

export const validateIncludesAndExcludes = (opts = [], type) => {
invariant(
Array.isArray(opts),
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 3d4baca

Please sign in to comment.