diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-09-19 18:29:21 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-09-19 18:29:21 +0300 |
commit | ddcd7e04181538b9c9b138c3eb9a734d9123144b (patch) | |
tree | a1889250662055fdf4654cf88858176d91ccd160 | |
parent | 50d51fca34585b51c1e6ecd168bda6e9e48b0bb2 (diff) | |
download | rspamd-ddcd7e04181538b9c9b138c3eb9a734d9123144b.tar.gz rspamd-ddcd7e04181538b9c9b138c3eb9a734d9123144b.zip |
[Minor] Guard for-in
-rw-r--r-- | .eslintrc.json | 2 | ||||
-rw-r--r-- | interface/js/app/history.js | 1 | ||||
-rw-r--r-- | interface/js/app/rspamd.js | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index fd33c6de2..fe3ace7c3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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", diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 1aab72456..0cd5675c0 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -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": diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index 1d41bd85b..fde541285 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -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]); } } |