Skip to content

Commit d202c73

Browse files
authored
Replace .includes with .indexOf for older Node 4 versions (#1813)
1 parent 5c84c65 commit d202c73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/commands/ls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function filterTree(tree: Tree, filters: Array<string>): boolean {
161161
}
162162

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

167167
return notDim && (found || hasChildren);

0 commit comments

Comments
 (0)