diff options
Diffstat (limited to 'tools/eslint/lib/rules/no-script-url.js')
-rw-r--r-- | tools/eslint/lib/rules/no-script-url.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/eslint/lib/rules/no-script-url.js b/tools/eslint/lib/rules/no-script-url.js index 1c12490b43..0d767bbd1e 100644 --- a/tools/eslint/lib/rules/no-script-url.js +++ b/tools/eslint/lib/rules/no-script-url.js @@ -27,11 +27,8 @@ module.exports = { return { Literal: function(node) { - - let value; - if (node.value && typeof node.value === "string") { - value = node.value.toLowerCase(); + const value = node.value.toLowerCase(); if (value.indexOf("javascript:") === 0) { context.report(node, "Script URL is a form of eval."); |