Skip to content

Commit 2fe2e24

Browse files
committed
pk agent start does not output recoveryCode if the value is undefined
1 parent 24af3aa commit 2fe2e24

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/bin/agent/CommandStart.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ class CommandStart extends CommandPolykey {
239239
type: options.format === 'json' ? 'json' : 'dict',
240240
data: {
241241
...statusLiveData!,
242-
recoveryCode: recoveryCodeOut,
242+
...(recoveryCodeOut != null
243+
? { recoveryCode: recoveryCodeOut }
244+
: {}),
243245
},
244246
}),
245247
);

0 commit comments

Comments
 (0)