]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Guard for-in
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 19 Sep 2018 15:29:21 +0000 (18:29 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 19 Sep 2018 15:29:21 +0000 (18:29 +0300)
.eslintrc.json
interface/js/app/history.js
interface/js/app/rspamd.js

index fd33c6de2752861e1e3055f0ac4e0334d0a61170..fe3ace7c320c9f72bbf2bec633bad48bbf94c83e 100644 (file)
@@ -28,6 +28,7 @@
         "multiline-comment-style": "off",
         "multiline-ternary": ["error", "always-multiline"],
         "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
+        "no-continue": "off",
         "no-extra-parens": ["error", "functions"],
         "no-implicit-globals": "off",
         "no-magic-numbers": "off",
@@ -60,7 +61,6 @@
         "consistent-this": "off",
         "func-style": "off",
         "function-paren-newline": "off",
-        "guard-for-in": "off",
         "line-comment-position": "off",
         "max-len": "off",
         "max-lines": "off",
index 1aab72456cf799a5d1078cfd1820fb4d4818d685..0cd5675c084b6396a0c7215c51eb559454959b8c 100644 (file)
@@ -61,6 +61,7 @@ define(["jquery", "footable", "humanize"],
 
         function preprocess_item(item) {
             for (var prop in item) {
+                if (!{}.hasOwnProperty.call(item, prop)) continue;
                 switch (prop) {
                     case "rcpt_mime":
                     case "rcpt_smtp":
index 1d41bd85b978d5c93ceeb4a29cf04d458e9bb6ae..fde54128500b3a1b06ca19f9fb19b4f2b00c511a 100644 (file)
@@ -54,6 +54,7 @@ function ($, D3pie, visibility, NProgress, tab_stat, tab_graph, tab_config,
 
     function stopTimers() {
         for (var key in timer_id) {
+            if (!{}.hasOwnProperty.call(timer_id, key)) continue;
             Visibility.stop(timer_id[key]);
         }
     }