File tree Expand file tree Collapse file tree 1 file changed +24
-22
lines changed Expand file tree Collapse file tree 1 file changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -9,25 +9,27 @@ export interface InputOption {
9
9
}
10
10
11
11
export const buildInputOptions = ( inputOptions : InputOption [ ] ) : Option [ ] =>
12
- inputOptions ?. map ( inputOption => {
13
- if ( ! inputOption ) {
14
- return ;
15
- }
16
- const option : Option = {
17
- text : inputOption . text ,
18
- } ;
19
- if ( inputOption . url ) {
20
- option . url = inputOption . url ;
21
- }
22
- if ( inputOption . value ) {
23
- option . value = inputOption . value ;
24
- }
25
- if ( inputOption . description ) {
26
- option . description = {
27
- text : inputOption . description ,
28
- type : 'plain_text' ,
29
- emoji : true ,
30
- } ;
31
- }
32
- return option ;
33
- } ) ?? [ ] ;
12
+ inputOptions
13
+ ? inputOptions . map ( inputOption => {
14
+ if ( ! inputOption ) {
15
+ return ;
16
+ }
17
+ const option : Option = {
18
+ text : inputOption . text ,
19
+ } ;
20
+ if ( inputOption . url ) {
21
+ option . url = inputOption . url ;
22
+ }
23
+ if ( inputOption . value ) {
24
+ option . value = inputOption . value ;
25
+ }
26
+ if ( inputOption . description ) {
27
+ option . description = {
28
+ text : inputOption . description ,
29
+ type : 'plain_text' ,
30
+ emoji : true ,
31
+ } ;
32
+ }
33
+ return option ;
34
+ } )
35
+ : [ ] ;
You can’t perform that action at this time.
0 commit comments