Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b3e13ab

Browse files
committed
Fix some lint errors
1 parent 3bada3e commit b3e13ab

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/plugins/cache.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,14 @@ plugin.getProblem = function(problem, cb) {
2828
const k = h.KEYS.problem(problem);
2929
const _problem = cache.get(k);
3030
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)
3333
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)
3736
log.debug('cache discarded for being too old: ' + k + '.json');
38-
}
39-
// cache hit
40-
else {
37+
} else {
38+
// cache hit
4139
log.debug('cache hit: ' + k + '.json');
4240
_.extendOwn(problem, _problem);
4341
return cb(null, problem);

0 commit comments

Comments
 (0)