File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
packages/plugin-js-packages/src/lib/package-managers/yarn-classic Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ import {
2020
2121export function yarnv1ToOutdatedResult ( output : string ) : OutdatedResult {
2222 const yarnv1Outdated = fromJsonLines < Yarnv1OutdatedResultJson > ( output ) ;
23- const fields = yarnv1Outdated [ 1 ] . data . head ;
24- const dependencies = yarnv1Outdated [ 1 ] . data . body ;
23+ const fields = yarnv1Outdated [ 1 ] ? .data . head ?? [ ] ;
24+ const dependencies = yarnv1Outdated [ 1 ] ? .data . body ?? [ ] ;
2525
2626 // no outdated dependencies
2727 if ( dependencies . length === 0 ) {
Original file line number Diff line number Diff line change @@ -51,4 +51,4 @@ type Yarnv1Table = {
5151 } ;
5252} ;
5353
54- export type Yarnv1OutdatedResultJson = [ Yarnv1Info , Yarnv1Table ] ;
54+ export type Yarnv1OutdatedResultJson = [ Yarnv1Info , Yarnv1Table ] | [ ] ;
You can’t perform that action at this time.
0 commit comments