Skip to content

Commit dd45fe9

Browse files
committed
fix node v12 CI
1 parent 0864d68 commit dd45fe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ skip.set('Missing type: all args to the right of the fromArg returned', async fu
102102
const optionDefinitions = [
103103
{
104104
from: arg => arg === '--one',
105-
to: (valueIndex, arg, index, argv) => argv[index + 1]?.startsWith('--')
105+
to: (valueIndex, arg, index, argv) => argv[index + 1] && argv[index + 1].startsWith('--')
106106
}
107107
]
108108
const cla = new CommandLineArgs(argv, optionDefinitions)
@@ -116,7 +116,7 @@ skip.set('name can be a function receiving the extraction matched by from and to
116116
const optionDefinitions = [
117117
{
118118
from: arg => arg === '--one',
119-
to: (valueIndex, arg, index, argv) => argv[index + 1]?.startsWith('--'),
119+
to: (valueIndex, arg, index, argv) => argv[index + 1] && argv[index + 1].startsWith('--'),
120120
name: (extraction) => extraction.join('|')
121121
}
122122
]

0 commit comments

Comments
 (0)