We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f42d9e0 commit 16acc22Copy full SHA for 16acc22
src/form/tp-form-field.ts
@@ -167,16 +167,19 @@ export class TPFormFieldElement extends HTMLElement {
167
if ( true === suspenseIsValid ) {
168
this.setAttribute( 'valid', 'yes' );
169
this.removeAttribute( 'error' );
170
+
171
+ // Resolve the promise.
172
+ resolve( true );
173
} else {
174
this.removeAttribute( 'valid' );
175
this.setAttribute( 'error', error );
176
177
178
+ resolve( false );
179
}
180
181
// Dispatch a custom 'validation-suspense-success' event.
182
this.dispatchEvent( new CustomEvent( 'validation-suspense-success' ) );
-
- // Resolve the promise.
- resolve( true );
183
} )
184
.catch( (): void => {
185
// There was an error.
0 commit comments