File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,14 @@ plugin.getProblem = function(problem, cb) {
28
28
const k = h . KEYS . problem ( problem ) ;
29
29
const _problem = cache . get ( k ) ;
30
30
if ( _problem ) {
31
- // do not hit problem without html tags in desc ( <pre> always exists for presenting testcase)
32
- if ( ! _problem . desc . includes ( " <pre>" ) ) {
31
+ if ( ! _problem . desc . includes ( ' <pre>' ) ) {
32
+ // do not hit problem without html tags in desc ( <pre> always exists for presenting testcase)
33
33
log . debug ( 'cache discarded for being no longer valid: ' + k + '.json' ) ;
34
- }
35
- // do not hit problem without likes & dislikes (logic will be improved in new lib)
36
- else if ( ! [ 'likes' , 'dislikes' ] . every ( p => p in _problem ) ) {
34
+ } else if ( ! [ 'likes' , 'dislikes' ] . every ( p => p in _problem ) ) {
35
+ // do not hit problem without likes & dislikes (logic will be improved in new lib)
37
36
log . debug ( 'cache discarded for being too old: ' + k + '.json' ) ;
38
- }
39
- // cache hit
40
- else {
37
+ } else {
38
+ // cache hit
41
39
log . debug ( 'cache hit: ' + k + '.json' ) ;
42
40
_ . extendOwn ( problem , _problem ) ;
43
41
return cb ( null , problem ) ;
You can’t perform that action at this time.
0 commit comments