File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -228,16 +228,14 @@ for (const favForm of document.querySelectorAll('form[action="/account/favorite/
228228 favForm . addEventListener ( 'submit' , async e => {
229229 e . preventDefault ( ) ;
230230 const formData = new FormData ( favForm ) ;
231- let response ;
232- try {
233- response = await fetch ( favForm . action , {
234- method : favForm . method ,
235- headers : {
236- 'Accepts' : 'application/json' ,
237- } ,
238- body : formData ,
239- } ) ;
240- } catch ( e ) {
231+ const response = await fetch ( favForm . action , {
232+ method : favForm . method ,
233+ headers : {
234+ 'Accept' : 'application/json' ,
235+ } ,
236+ body : formData ,
237+ } ) ;
238+ if ( ! response . ok ) {
241239 if ( confirm ( "You have to complete a Captcha in order to ++." ) ) {
242240 document . location . href = "/account/turing" ;
243241 }
You can’t perform that action at this time.
0 commit comments