We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d94485 commit 2cbd4beCopy full SHA for 2cbd4be
src/providers/javascript_yarn.js
@@ -30,7 +30,7 @@ export default class Javascript_yarn extends Base_javascript {
30
const version = this._version() ?? '';
31
const matches = Javascript_yarn.VERSION_PATTERN.exec(version);
32
33
- if (!matches || matches.length < 2) {
+ if (!matches?.length < 2) {
34
throw new Error(`Invalid Yarn version format: ${version}`);
35
}
36
src/providers/processors/yarn_berry_processor.js
@@ -134,7 +134,7 @@ export default class Yarn_berry_processor extends Yarn_processor {
134
* @private
135
*/
136
#purlFromNode(depName, node) {
137
- if (!node || !node.children || !node.children.Version) {
+ if (!node?.children?.Version) {
138
return undefined;
139
140
0 commit comments