Skip to content

Commit

Permalink
Merge pull request #1277 from embroider-build/loop-fix
Browse files Browse the repository at this point in the history
defend against infinite loop on broken babel config
  • Loading branch information
ef4 authored Nov 16, 2022
2 parents be37be5 + ebcdf68 commit aea93d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/portable-babel-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PortableBabelConfig {
// trim back down our array, because trailing undefined will get
// converted into null via json.stringify, and babel will complain
// about that.
while (dehydrated.value[dehydrated.value.length - 1] == null) {
while (dehydrated.value.length > 0 && dehydrated.value[dehydrated.value.length - 1] == null) {
dehydrated.value.pop();
}
if (dehydrated.value.length === 1) {
Expand Down

0 comments on commit aea93d7

Please sign in to comment.