diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
commit | 0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch) | |
tree | f9864d4a4148621378958794cbbfdc2393733283 /node_modules/tslint/lib/language/utils.js | |
parent | 6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff) |
upgrade dependencies
Diffstat (limited to 'node_modules/tslint/lib/language/utils.js')
-rw-r--r-- | node_modules/tslint/lib/language/utils.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/tslint/lib/language/utils.js b/node_modules/tslint/lib/language/utils.js index 30983ec6b..e9ba81a48 100644 --- a/node_modules/tslint/lib/language/utils.js +++ b/node_modules/tslint/lib/language/utils.js @@ -64,13 +64,13 @@ exports.isBlockScopedVariable = isBlockScopedVariable; function isBlockScopedBindingElement(node) { var variableDeclaration = getBindingElementVariableDeclaration(node); // if no variable declaration, it must be a function param, which is block scoped - return (variableDeclaration == null) || isBlockScopedVariable(variableDeclaration); + return (variableDeclaration === null) || isBlockScopedVariable(variableDeclaration); } exports.isBlockScopedBindingElement = isBlockScopedBindingElement; function getBindingElementVariableDeclaration(node) { var currentParent = node.parent; while (currentParent.kind !== ts.SyntaxKind.VariableDeclaration) { - if (currentParent.parent == null) { + if (currentParent.parent === undefined) { return null; // function parameter, no variable declaration } else { @@ -92,7 +92,7 @@ exports.childOfKind = childOfKind; * @returns true if some ancestor of `node` satisfies `predicate`, including `node` itself. */ function someAncestor(node, predicate) { - return predicate(node) || (node.parent != null && someAncestor(node.parent, predicate)); + return predicate(node) || (node.parent !== undefined && someAncestor(node.parent, predicate)); } exports.someAncestor = someAncestor; function ancestorWhere(node, predicate) { |