Tiny refactor; use `== null`

Reviewed By: davidaurelio

Differential Revision: D7575286

fbshipit-source-id: a9e0fc7ee5a15ce1eabb84759cf584df2acca008
This commit is contained in:
Peter van der Zee 2018-04-10 17:37:58 -07:00 committed by Facebook Github Bot
parent 11cc6a7f65
commit 8073bdaa08
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ const babelOptions = {
};
function normalize({code}): string {
if (code === undefined || code === null) {
if (code == null) {
return 'FAIL';
}
return transformSync(code, babelOptions).code;

View File

@ -219,7 +219,7 @@ function getPreset7() {
['transform-modules-commonjs', {strict: false, allowTopLevelThis: true}],
);
if (src !== null && src !== undefined) {
if (src != null) {
addPluginsWhenSourceNeedsIt(src, plugins);
}