Skip to content

Commit

Permalink
Make add explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 6, 2019
1 parent 958175c commit d4c95c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/types/number/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const serializeNodes = function(values, nodes) {
}

const hasAdd = function({ add }) {
return add
return add === true
}

const sum = function(memo, number) {
Expand Down
2 changes: 1 addition & 1 deletion src/types/octal/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const invertAdd = function(node) {
}

const hasAdd = function({ add }) {
return add
return add === true
}

// =octal means that some permissions are +, others -
Expand Down
2 changes: 1 addition & 1 deletion src/types/octal/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const serializeOperator = function({ nodes }) {
}

const isRemoved = function({ add }) {
return !add
return add !== true
}

// Re-use `number` serialization logic, then stringify to an octal number
Expand Down
2 changes: 1 addition & 1 deletion src/types/stat/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const getAddedNodes = function({ nodes }) {
}

const hasAdd = function({ add }) {
return add
return add === true
}

// Returns either `-` or the permission character
Expand Down

0 comments on commit d4c95c0

Please sign in to comment.