Skip to content

Commit

Permalink
Replace .includes with .indexOf for older Node 4 versions (#1813)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze authored Nov 14, 2016
1 parent 5c84c65 commit d202c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/commands/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function filterTree(tree: Tree, filters: Array<string>): boolean {
}

const notDim = tree.color !== 'dim';
const found = (filters.includes(tree.name.slice(0, tree.name.lastIndexOf('@'))) : boolean);
const found = filters.indexOf(tree.name.slice(0, tree.name.lastIndexOf('@'))) > -1;
const hasChildren = tree.children == null ? false : tree.children.length > 0;

return notDim && (found || hasChildren);
Expand Down

0 comments on commit d202c73

Please sign in to comment.