File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
src/generators/legacy-json/utils Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -47,28 +47,20 @@ export const createSectionBuilder = () => {
4747 } ) => {
4848 const meta = { changes } ;
4949
50- const aded_in_array = enforceArray ( added_in ) ;
51-
52- if ( aded_in_array . length ) {
53- meta . added = aded_in_array ;
50+ if ( added_in ?. length ) {
51+ meta . added = enforceArray ( added_in ) ;
5452 }
5553
56- const n_api_version_array = enforceArray ( n_api_version ) ;
57-
58- if ( n_api_version_array . length ) {
59- meta . napiVersion = n_api_version_array ;
54+ if ( n_api_version ?. length ) {
55+ meta . napiVersion = enforceArray ( n_api_version ) ;
6056 }
6157
62- const deprecated_in_array = enforceArray ( deprecated_in ) ;
63-
64- if ( deprecated_in_array . length ) {
65- meta . deprecated = deprecated_in_array ;
58+ if ( deprecated_in ?. length ) {
59+ meta . deprecated = enforceArray ( deprecated_in ) ;
6660 }
6761
68- const removed_in_array = enforceArray ( removed_in ) ;
69-
70- if ( removed_in_array . length ) {
71- meta . removed = removed_in_array ;
62+ if ( removed_in ?. length ) {
63+ meta . removed = enforceArray ( removed_in ) ;
7264 }
7365
7466 // Check if there are any non-empty fields in the meta object
You can’t perform that action at this time.
0 commit comments