fix no-empty
ping exception should be impossible, because StrongSocket already catches native exceptions. loadScript exception should be impossible, because it returns a Promise.pull/8592/head
parent
c671e5e380
commit
842a67f0e1
|
@ -17,6 +17,7 @@
|
|||
"rules": {
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"no-duplicate-imports": "error",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
|
||||
"eqeqeq": "off",
|
||||
"prefer-const": "off",
|
||||
|
@ -31,8 +32,6 @@
|
|||
"prefer-spread": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-empty": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"no-constant-condition": "off",
|
||||
"no-async-promise-executor": "off"
|
||||
}
|
||||
|
|
|
@ -98,11 +98,7 @@ export default function (element: HTMLElement, ctrl: AnalyseCtrl) {
|
|||
.filter('.' + panel)
|
||||
.addClass('active');
|
||||
if ((panel == 'move-times' || ctrl.opts.hunter) && !lichess.movetimeChart)
|
||||
try {
|
||||
lichess.loadScript('javascripts/chart/movetime.js').then(function () {
|
||||
lichess.movetimeChart(data, ctrl.trans);
|
||||
});
|
||||
} catch (e) {}
|
||||
lichess.loadScript('javascripts/chart/movetime.js').then(() => lichess.movetimeChart(data, ctrl.trans));
|
||||
if ((panel == 'computer-analysis' || ctrl.opts.hunter) && $('#acpl-chart').length)
|
||||
setTimeout(startAdvantageChart, 200);
|
||||
};
|
||||
|
|
|
@ -72,7 +72,9 @@ export default function (opts: CevalOpts): CevalCtrl {
|
|||
try {
|
||||
sharedMem.grow(8);
|
||||
growableSharedMem = true;
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
// memory growth not supported
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,9 +61,7 @@ export default function (opts: ChallengeOpts) {
|
|||
|
||||
function pingNow() {
|
||||
if (document.getElementById('ping-challenge')) {
|
||||
try {
|
||||
lichess.socket.send('ping');
|
||||
} catch (e) {}
|
||||
lichess.socket.send('ping');
|
||||
setTimeout(pingNow, 9000);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue