Skip to content

Commit

Permalink
falsy code check
Browse files Browse the repository at this point in the history
  • Loading branch information
ethayer committed Jan 10, 2017
1 parent a840190 commit c2145e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion smartapps/ethayer/lock-manager.src/lock-manager.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def removeUnmanagedCodes(evt) {
if (!child) {
def currentCode = codeData."code${slot}"
// there is no app associated
if (currentCode != '') {
if (currentCode) {
// Code is set, We should be disabled.
array << ["code${slot}", '']
}
Expand Down
2 changes: 1 addition & 1 deletion smartapps/ethayer/lock-user.src/lock-user.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ def pollCodeReport(evt) {
array << ["code${userSlot}", userCode]
}
} else {
if (currentCode != '') {
if (currentCode) {
// Code is set, We should be disabled.
array << ["code${userSlot}", '']
}
Expand Down

0 comments on commit c2145e4

Please sign in to comment.