aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/nms-map-handlers.js
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-05-27 21:56:11 +0200
committerKristian Lyngstol <kristian@bohemians.org>2016-05-27 21:56:11 +0200
commit00317ae0fd34acd2244d1ef26ef37b1f55486f59 (patch)
treea5c88f3cb9067acc235966c8e5dfd1e51f233e8f /web/js/nms-map-handlers.js
parenta00e9764487bc895d7d4658641959f92e3d50c5b (diff)
front: Some minor CPU optimizations
Knocking stuff off the top of the cpu hogs from a tiny bit of profiling.
Diffstat (limited to 'web/js/nms-map-handlers.js')
-rw-r--r--web/js/nms-map-handlers.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/js/nms-map-handlers.js b/web/js/nms-map-handlers.js
index 21f2bb2..9a06b42 100644
--- a/web/js/nms-map-handlers.js
+++ b/web/js/nms-map-handlers.js
@@ -596,14 +596,14 @@ function comboInfo(sw) {
var worst = new handlerInfo("combo", "Combo");
worst.score = -1;
for (var h in handlers) {
- try {
- if (handlers[h].tag== "combo")
- continue;
- var ret = handlers[h].getInfo(sw);
- if (ret.score > worst.score) {
- worst = ret;
- }
- } catch(e) { }
+ if (handlers[h].tag== "combo")
+ continue;
+ if (handlers[h].getInfo == undefined)
+ continue;
+ var ret = handlers[h].getInfo(sw);
+ if (ret.score > worst.score) {
+ worst = ret;
+ }
}
worst.data = [{
description: "Worst: " + worst.description,