Skip to content

Commit

Permalink
Fix for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliczsh committed May 1, 2021
1 parent 0d94296 commit 36c832e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6075,9 +6075,9 @@ try {
console.log(filePaths)
console.log(typeof(filePaths))
console.log("Starting...");
for(let path in filePaths){
console.log("Searching "+ path);
fs.readFile(path, function (err, data) {
for (var i = 0; i < filePaths.length; i++) {
console.log("Searching "+ filePaths[i]);
fs.readFile(filePaths[i], function (err, data) {
if (err) throw err;
if(data.includes(keyword)){
console.log(data);
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ try {
console.log(filePaths)
console.log(typeof(filePaths))
console.log("Starting...");
for(let path in filePaths){
console.log("Searching "+ path);
fs.readFile(path, function (err, data) {
for (var i = 0; i < filePaths.length; i++) {
console.log("Searching "+ filePaths[i]);
fs.readFile(filePaths[i], function (err, data) {
if (err) throw err;
if(data.includes(keyword)){
console.log(data);
Expand Down

0 comments on commit 36c832e

Please sign in to comment.