sisoe24 / Nuke-Tools

Logical operator can be refactored to optional chain JS-W1044
Anti-pattern
Minor
5 months ago5 months old
Prefer using an optional chain expression instead, as it's more concise and easier to read
 83    fs.readdirSync(dir).forEach(function (file) {
 84        file = dir + path.sep + file;
 85        const stat = fs.statSync(file);
 86        if (stat && stat.isDirectory()) { 87            /* Recurse into a subdirectory */
 88            results = results.concat(osWalk(file));
 89        } else {