File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ class OptionsSync<UserOptions extends Options> {
172172 The form fields' `name` attributes will have to match the option names.
173173 */
174174 async syncForm ( form : string | HTMLFormElement ) : Promise < void > {
175+ this . stopSyncForm ( ) ;
175176 this . _form = form instanceof HTMLFormElement
176177 ? form
177178 : document . querySelector < HTMLFormElement > ( form ) ! ;
@@ -192,7 +193,7 @@ class OptionsSync<UserOptions extends Options> {
192193 /**
193194 Removes any listeners added by `syncForm`
194195 */
195- async stopSyncForm ( ) : Promise < void > {
196+ stopSyncForm ( ) : void {
196197 if ( this . _form ) {
197198 this . _form . removeEventListener ( 'input' , this . _handleFormInput ) ;
198199 this . _form . removeEventListener ( 'submit' , this . _handleFormSubmit ) ;
You can’t perform that action at this time.
0 commit comments