File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ module.exports = {
17
17
}
18
18
}
19
19
] ,
20
- '@typescript-eslint/prefer-nullish-coalescing' : 0
20
+ '@typescript-eslint/prefer-nullish-coalescing' : 0 ,
21
+ '@typescript-eslint/return-await' : 0 ,
22
+ '@typescript-eslint/no-floating-promises' : 0
21
23
}
22
24
}
Original file line number Diff line number Diff line change @@ -20,13 +20,23 @@ class DB {
20
20
this . db . _ . mixin ( lodashId )
21
21
22
22
if ( ! this . db . has ( 'picBed' ) . value ( ) ) {
23
- this . db . set ( 'picBed' , {
24
- uploader : 'smms' ,
25
- current : 'smms'
26
- } ) . write ( ) . catch ( ( e ) => { this . ctx . log . error ( e ) } )
23
+ try {
24
+ this . db . set ( 'picBed' , {
25
+ uploader : 'smms' ,
26
+ current : 'smms'
27
+ } ) . write ( )
28
+ } catch ( e ) {
29
+ this . ctx . log . error ( e )
30
+ throw e
31
+ }
27
32
}
28
33
if ( ! this . db . has ( 'picgoPlugins' ) . value ( ) ) {
29
- this . db . set ( 'picgoPlugins' , { } ) . write ( ) . catch ( ( e ) => { this . ctx . log . error ( e ) } )
34
+ try {
35
+ this . db . set ( 'picgoPlugins' , { } ) . write ( )
36
+ } catch ( e ) {
37
+ this . ctx . log . error ( e )
38
+ throw e
39
+ }
30
40
}
31
41
}
32
42
You can’t perform that action at this time.
0 commit comments