File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ async function assertThrowException(client: Client) {
105105async function assertGetFormConfig ( client : Client ) {
106106 const form = await client . test ( ) . getFormConfig ( ) ;
107107
108- if ( form . elements . length != 3 ) {
109- throw new Error ( "Test assertGetFormConfig failed: Elements, got: " + form . elements . length ) ;
108+ if ( form . elements ? .length != 3 ) {
109+ throw new Error ( "Test assertGetFormConfig failed: Elements, got: " + form . elements ? .length ) ;
110110 }
111111
112112 if ( form . elements [ 0 ] . element !== 'input' ) {
@@ -121,8 +121,8 @@ async function assertGetFormConfig(client: Client) {
121121 throw new Error ( "Test assertGetFormConfig failed: Elements.1, got: " + form . elements [ 1 ] . element ) ;
122122 }
123123
124- if ( form . elements [ 1 ] . options . length != 2 ) {
125- throw new Error ( "Test assertGetFormConfig failed: Elements.1.Options, got: " + form . elements [ 1 ] . options . length ) ;
124+ if ( form . elements [ 1 ] . options ? .length != 2 ) {
125+ throw new Error ( "Test assertGetFormConfig failed: Elements.1.Options, got: " + form . elements [ 1 ] . options ? .length ) ;
126126 }
127127
128128 if ( form . elements [ 2 ] . element !== 'textarea' ) {
You can’t perform that action at this time.
0 commit comments