Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dword-design committed Apr 20, 2021
1 parent 652773f commit 3d0ff8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,15 @@ async function main() {
syncFailed = true
}
}
const isChanged = overwriteFile
? !isEqual(originalPkg, pkg)
: results.filter(result => {
if (!result.enabled) {
return false
}
if (result.isEqual) {
return false
}
return true
})
const isChanged = results.filter(result => {
if (!result.enabled) {
return false
}
if (result.isEqual) {
return false
}
return true
})
if (overwriteFile && isChanged) {
const indent = detectIndent(pkgString).indent || " "
const outputJson = JSON.stringify(pkg, null, indent)
Expand Down

0 comments on commit 3d0ff8e

Please sign in to comment.