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 {
20
20
21
21
export function yarnv1ToOutdatedResult ( output : string ) : OutdatedResult {
22
22
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 ?? [ ] ;
25
25
26
26
// no outdated dependencies
27
27
if ( dependencies . length === 0 ) {
Original file line number Diff line number Diff line change @@ -51,4 +51,4 @@ type Yarnv1Table = {
51
51
} ;
52
52
} ;
53
53
54
- export type Yarnv1OutdatedResultJson = [ Yarnv1Info , Yarnv1Table ] ;
54
+ export type Yarnv1OutdatedResultJson = [ Yarnv1Info , Yarnv1Table ] | [ ] ;
You can’t perform that action at this time.
0 commit comments