Skip to content

Commit

Permalink
Fixes empty yarnrc files
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Mar 7, 2020
1 parent 4d6f909 commit 35286b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lockfile/parse.js
Expand Up @@ -398,9 +398,14 @@ function parse(str: string, fileLoc: string): Object {
}
}
} else {
return safeLoad(str, {
const result = safeLoad(str, {
schema: FAILSAFE_SCHEMA,
});
if (typeof result === 'object') {
return result;
} else {
return {};
}
}
}

Expand Down

0 comments on commit 35286b9

Please sign in to comment.