Skip to content

Commit

Permalink
fix: mark files with only whitespace as not found
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Feb 9, 2020
1 parent 8e5a10f commit 343c43c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sync-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ module.exports = {
async fileContent (filePath) {
try {
const content = await readFile(filePath, { encoding: 'utf8' })
return content !== '' ? content : null
return content.trim() !== '' ? content : null
} catch (err) {
console.error(`Error reading file ${filePath}. Probably doesn't exist.`, err)
return null
Expand Down

0 comments on commit 343c43c

Please sign in to comment.