Skip to content

Commit

Permalink
Fix error when no "targets" options in .babelrc (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijia Wang authored and devongovett committed Feb 24, 2018
1 parent 32c38e5 commit 69f7c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/getTargetEngines.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async function loadBabelrc(asset, path) {
Array.isArray(plugin) &&
(plugin[0] === 'env' || plugin[0] === '@babel/env')
);
if (env && env[1].targets) {
if (env && env[1] && env[1].targets) {
return env[1].targets;
}
}
Expand Down

0 comments on commit 69f7c6d

Please sign in to comment.