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

Fix hasBeenWarned condition. #175

Merged
merged 2 commits into from
Feb 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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