Skip to content

Commit a85ae1d

Browse files
committed
False expression should not be in dependencies
1 parent ee3b788 commit a85ae1d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/create-react-app/index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,11 @@ function install(useYarn, dependencies, verbose, isOnline) {
164164
args = [
165165
'add',
166166
'--exact',
167-
isOnline === false && '--offline'
168-
].concat(dependencies);
167+
];
168+
if (!isOnline) {
169+
args.push('--offline');
170+
}
171+
[].push.apply(args, dependencies);
169172

170173
if (!isOnline) {
171174
console.log(chalk.yellow('You appear to be offline.'));

0 commit comments

Comments
 (0)